home *** CD-ROM | disk | FTP | other *** search
/ SGI Freeware 1999 August / SGI Freeware 1999 August.iso / dist / fw_xemacs.idb / usr / freeware / lib / xemacs-20.4 / lisp / eterm / tshell.elc.z / tshell.elc
Emacs Compiled Lisp  |  1998-05-21  |  18.2 KB

open in: MacOS 8.1     |     Win98     |     DOS

view JSON data     |     view as text


This file was processed as: Emacs Compiled Lisp (other/emacsCompiledLisp).
This format is not currently supported by dexvert.

ConfidenceProgramDetectionMatch TypeSupport
1% dexvert Emacs Compiled Lisp (other/emacsCompiledLisp) magic Unsupported
100% file Emacs/XEmacs v20 byte-compiled Lisp data default
99% file data default
100% TrID Emacs/XEmacs byte-compiled Lisp (generic) default



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 3b 45 4c 43 14 00 00 00 | 0a 3b 3b 3b 20 63 6f 6d |;ELC....|.;;; com|
|00000010| 70 69 6c 65 64 20 62 79 | 20 6a 75 73 74 69 6e 62 |piled by| justinb|
|00000020| 40 65 62 6f 6e 79 2e 63 | 72 61 79 2e 63 6f 6d 20 |@ebony.c|ray.com |
|00000030| 6f 6e 20 4d 6f 6e 20 4d | 61 72 20 20 39 20 31 32 |on Mon M|ar 9 12|
|00000040| 3a 34 39 3a 31 39 20 31 | 39 39 38 0a 3b 3b 3b 20 |:49:19 1|998.;;; |
|00000050| 66 72 6f 6d 20 66 69 6c | 65 20 2f 68 6f 6d 65 2f |from fil|e /home/|
|00000060| 61 73 70 65 6e 30 37 2f | 6a 75 73 74 69 6e 62 2f |aspen07/|justinb/|
|00000070| 72 6f 6f 74 73 2f 66 72 | 65 65 77 61 72 65 2f 78 |roots/fr|eeware/x|
|00000080| 65 6d 61 63 73 2f 32 30 | 2e 33 2f 78 65 6d 61 63 |emacs/20|.3/xemac|
|00000090| 73 2d 32 30 2e 33 2f 6c | 69 73 70 2f 65 74 65 72 |s-20.3/l|isp/eter|
|000000a0| 6d 2f 74 73 68 65 6c 6c | 2e 65 6c 0a 3b 3b 3b 20 |m/tshell|.el.;;; |
|000000b0| 65 6d 61 63 73 20 76 65 | 72 73 69 6f 6e 20 32 30 |emacs ve|rsion 20|
|000000c0| 2e 34 20 22 45 6d 65 72 | 61 6c 64 22 20 58 45 6d |.4 "Emer|ald" XEm|
|000000d0| 61 63 73 20 20 4c 75 63 | 69 64 2e 0a 3b 3b 3b 20 |acs Luc|id..;;; |
|000000e0| 62 79 74 65 63 6f 6d 70 | 20 76 65 72 73 69 6f 6e |bytecomp| version|
|000000f0| 20 32 2e 32 35 20 58 45 | 6d 61 63 73 3b 20 32 32 | 2.25 XE|macs; 22|
|00000100| 2d 4d 61 72 2d 39 36 2e | 0a 3b 3b 3b 20 6f 70 74 |-Mar-96.|.;;; opt|
|00000110| 69 6d 69 7a 61 74 69 6f | 6e 20 69 73 20 6f 6e 2e |imizatio|n is on.|
|00000120| 0a 3b 3b 3b 20 74 68 69 | 73 20 66 69 6c 65 20 75 |.;;; thi|s file u|
|00000130| 73 65 73 20 6f 70 63 6f | 64 65 73 20 77 68 69 63 |ses opco|des whic|
|00000140| 68 20 64 6f 20 6e 6f 74 | 20 65 78 69 73 74 20 69 |h do not| exist i|
|00000150| 6e 20 45 6d 61 63 73 20 | 31 39 2e 0a 0a 28 69 66 |n Emacs |19...(if|
|00000160| 20 28 61 6e 64 20 28 62 | 6f 75 6e 64 70 20 27 65 | (and (b|oundp 'e|
|00000170| 6d 61 63 73 2d 76 65 72 | 73 69 6f 6e 29 0a 09 20 |macs-ver|sion).. |
|00000180| 28 6f 72 20 28 61 6e 64 | 20 28 62 6f 75 6e 64 70 |(or (and| (boundp|
|00000190| 20 27 65 70 6f 63 68 3a | 3a 76 65 72 73 69 6f 6e | 'epoch:|:version|
|000001a0| 29 20 65 70 6f 63 68 3a | 3a 76 65 72 73 69 6f 6e |) epoch:|:version|
|000001b0| 29 0a 09 20 20 20 20 20 | 28 73 74 72 69 6e 67 2d |).. |(string-|
|000001c0| 6c 65 73 73 70 20 65 6d | 61 63 73 2d 76 65 72 73 |lessp em|acs-vers|
|000001d0| 69 6f 6e 20 22 32 30 22 | 29 29 29 0a 20 20 20 20 |ion "20"|))). |
|000001e0| 28 65 72 72 6f 72 20 22 | 60 74 73 68 65 6c 6c 2e |(error "|`tshell.|
|000001f0| 65 6c 27 20 77 61 73 20 | 63 6f 6d 70 69 6c 65 64 |el' was |compiled|
|00000200| 20 66 6f 72 20 45 6d 61 | 63 73 20 32 30 22 29 29 | for Ema|cs 20"))|
|00000210| 0a 0a 28 6f 72 20 28 62 | 6f 75 6e 64 70 20 27 63 |..(or (b|oundp 'c|
|00000220| 75 72 72 65 6e 74 2d 6c | 6f 61 64 2d 6c 69 73 74 |urrent-l|oad-list|
|00000230| 29 20 28 73 65 74 71 20 | 63 75 72 72 65 6e 74 2d |) (setq |current-|
|00000240| 6c 6f 61 64 2d 6c 69 73 | 74 20 6e 69 6c 29 29 0a |load-lis|t nil)).|
|00000250| 0a 0a 28 72 65 71 75 69 | 72 65 20 27 74 65 72 6d |..(requi|re 'term|
|00000260| 29 0a 23 40 34 32 35 20 | 52 65 67 65 78 70 20 74 |).#@425 |Regexp t|
|00000270| 6f 20 6d 61 74 63 68 20 | 70 72 6f 6d 70 74 73 20 |o match |prompts |
|00000280| 69 6e 20 74 68 65 20 69 | 6e 66 65 72 69 6f 72 20 |in the i|nferior |
|00000290| 73 68 65 6c 6c 2e 0a 44 | 65 66 61 75 6c 74 73 20 |shell..D|efaults |
|000002a0| 74 6f 20 22 5e 5b 5e 23 | 24 25 3e 5c 6e 5d 2a 5b |to "^[^#|$%>\n]*[|
|000002b0| 23 24 25 3e 5d 20 2a 22 | 2c 20 77 68 69 63 68 20 |#$%>] *"|, which |
|000002c0| 77 6f 72 6b 73 20 70 72 | 65 74 74 79 20 77 65 6c |works pr|etty wel|
|000002d0| 6c 2e 0a 54 68 69 73 20 | 76 61 72 69 61 62 6c 65 |l..This |variable|
|000002e0| 20 69 73 20 75 73 65 64 | 20 74 6f 20 69 6e 69 74 | is used| to init|
|000002f0| 69 61 6c 69 73 65 20 60 | 74 65 72 6d 2d 70 72 6f |ialise `|term-pro|
|00000300| 6d 70 74 2d 72 65 67 65 | 78 70 27 20 69 6e 20 74 |mpt-rege|xp' in t|
|00000310| 68 65 20 0a 73 68 65 6c | 6c 20 62 75 66 66 65 72 |he .shel|l buffer|
|00000320| 2e 0a 0a 54 68 65 20 70 | 61 74 74 65 72 6e 20 73 |...The p|attern s|
|00000330| 68 6f 75 6c 64 20 70 72 | 6f 62 61 62 6c 79 20 6e |hould pr|obably n|
|00000340| 6f 74 20 6d 61 74 63 68 | 20 6d 6f 72 65 20 74 68 |ot match| more th|
|00000350| 61 6e 20 6f 6e 65 20 6c | 69 6e 65 2e 20 20 49 66 |an one l|ine. If|
|00000360| 20 69 74 20 64 6f 65 73 | 2c 0a 74 73 68 65 6c 6c | it does|,.tshell|
|00000370| 2d 6d 6f 64 65 20 6d 61 | 79 20 62 65 63 6f 6d 65 |-mode ma|y become|
|00000380| 20 63 6f 6e 66 75 73 65 | 64 20 74 72 79 69 6e 67 | confuse|d trying|
|00000390| 20 74 6f 20 64 69 73 74 | 69 6e 67 75 69 73 68 20 | to dist|inguish |
|000003a0| 70 72 6f 6d 70 74 20 66 | 72 6f 6d 20 69 6e 70 75 |prompt f|rom inpu|
|000003b0| 74 0a 6f 6e 20 6c 69 6e | 65 73 20 77 68 69 63 68 |t.on lin|es which|
|000003c0| 20 64 6f 6e 27 74 20 73 | 74 61 72 74 20 77 69 74 | don't s|tart wit|
|000003d0| 68 20 61 20 70 72 6f 6d | 70 74 2e 0a 0a 54 68 69 |h a prom|pt...Thi|
|000003e0| 73 20 69 73 20 61 20 66 | 69 6e 65 20 74 68 69 6e |s is a f|ine thin|
|000003f0| 67 20 74 6f 20 73 65 74 | 20 69 6e 20 79 6f 75 72 |g to set| in your|
|00000400| 20 60 2e 65 6d 61 63 73 | 27 20 66 69 6c 65 2e 1f | `.emacs|' file..|
|00000410| 0a 28 64 65 66 76 61 72 | 20 74 73 68 65 6c 6c 2d |.(defvar| tshell-|
|00000420| 70 72 6f 6d 70 74 2d 70 | 61 74 74 65 72 6e 20 22 |prompt-p|attern "|
|00000430| 5e 5b 5e 23 24 25 3e 5c | 6e 5d 2a 5b 23 24 25 3e |^[^#$%>\|n]*[#$%>|
|00000440| 5d 20 2a 22 20 28 23 24 | 20 2e 20 36 31 36 29 29 |] *" (#$| . 616))|
|00000450| 0a 23 40 32 39 33 20 2a | 4c 69 73 74 20 6f 66 20 |.#@293 *|List of |
|00000460| 73 75 66 66 69 78 65 73 | 20 74 6f 20 62 65 20 64 |suffixes| to be d|
|00000470| 69 73 72 65 67 61 72 64 | 65 64 20 64 75 72 69 6e |isregard|ed durin|
|00000480| 67 20 66 69 6c 65 2f 63 | 6f 6d 6d 61 6e 64 20 63 |g file/c|ommand c|
|00000490| 6f 6d 70 6c 65 74 69 6f | 6e 2e 0a 54 68 69 73 20 |ompletio|n..This |
|000004a0| 76 61 72 69 61 62 6c 65 | 20 69 73 20 75 73 65 64 |variable| is used|
|000004b0| 20 74 6f 20 69 6e 69 74 | 69 61 6c 69 7a 65 20 60 | to init|ialize `|
|000004c0| 74 65 72 6d 2d 63 6f 6d | 70 6c 65 74 69 6f 6e 2d |term-com|pletion-|
|000004d0| 66 69 67 6e 6f 72 65 27 | 20 69 6e 20 74 68 65 20 |fignore'| in the |
|000004e0| 73 68 65 6c 6c 0a 62 75 | 66 66 65 72 2e 20 20 54 |shell.bu|ffer. T|
|000004f0| 68 65 20 64 65 66 61 75 | 6c 74 20 69 73 20 6e 69 |he defau|lt is ni|
|00000500| 6c 2c 20 66 6f 72 20 63 | 6f 6d 70 61 74 69 62 69 |l, for c|ompatibi|
|00000510| 6c 69 74 79 20 77 69 74 | 68 20 6d 6f 73 74 20 73 |lity wit|h most s|
|00000520| 68 65 6c 6c 73 2e 0a 53 | 6f 6d 65 20 70 65 6f 70 |hells..S|ome peop|
|00000530| 6c 65 20 6c 69 6b 65 20 | 28 22 7e 22 20 22 23 22 |le like |("~" "#"|
|00000540| 20 22 25 22 29 2e 0a 0a | 54 68 69 73 20 69 73 20 | "%")...|This is |
|00000550| 61 20 66 69 6e 65 20 74 | 68 69 6e 67 20 74 6f 20 |a fine t|hing to |
|00000560| 73 65 74 20 69 6e 20 79 | 6f 75 72 20 60 2e 65 6d |set in y|our `.em|
|00000570| 61 63 73 27 20 66 69 6c | 65 2e 1f 0a 28 64 65 66 |acs' fil|e...(def|
|00000580| 76 61 72 20 74 73 68 65 | 6c 6c 2d 63 6f 6d 70 6c |var tshe|ll-compl|
|00000590| 65 74 69 6f 6e 2d 66 69 | 67 6e 6f 72 65 20 6e 69 |etion-fi|gnore ni|
|000005a0| 6c 20 28 23 24 20 2e 20 | 2d 31 31 31 31 29 29 0a |l (#$ . |-1111)).|
|000005b0| 23 40 32 34 30 20 4c 69 | 73 74 20 6f 66 20 63 68 |#@240 Li|st of ch|
|000005c0| 61 72 61 63 74 65 72 73 | 20 74 6f 20 72 65 63 6f |aracters| to reco|
|000005d0| 67 6e 69 73 65 20 61 73 | 20 73 65 70 61 72 61 74 |gnise as| separat|
|000005e0| 65 20 61 72 67 75 6d 65 | 6e 74 73 2e 0a 54 68 69 |e argume|nts..Thi|
|000005f0| 73 20 76 61 72 69 61 62 | 6c 65 20 69 73 20 75 73 |s variab|le is us|
|00000600| 65 64 20 74 6f 20 69 6e | 69 74 69 61 6c 69 7a 65 |ed to in|itialize|
|00000610| 20 60 74 65 72 6d 2d 64 | 65 6c 69 6d 69 74 65 72 | `term-d|elimiter|
|00000620| 2d 61 72 67 75 6d 65 6e | 74 2d 6c 69 73 74 27 20 |-argumen|t-list' |
|00000630| 69 6e 20 74 68 65 0a 73 | 68 65 6c 6c 20 62 75 66 |in the.s|hell buf|
|00000640| 66 65 72 2e 20 20 54 68 | 65 20 64 65 66 61 75 6c |fer. Th|e defaul|
|00000650| 74 20 69 73 20 28 3f 5c | 7c 20 3f 26 20 3f 3c 20 |t is (?\|| ?& ?< |
|00000660| 3f 3e 20 3f 5c 28 20 3f | 5c 29 20 3f 5c 3b 29 2e |?> ?\( ?|\) ?\;).|
|00000670| 0a 0a 54 68 69 73 20 69 | 73 20 61 20 66 69 6e 65 |..This i|s a fine|
|00000680| 20 74 68 69 6e 67 20 74 | 6f 20 73 65 74 20 69 6e | thing t|o set in|
|00000690| 20 79 6f 75 72 20 60 2e | 65 6d 61 63 73 27 20 66 | your `.|emacs' f|
|000006a0| 69 6c 65 2e 1f 0a 28 64 | 65 66 76 61 72 20 74 73 |ile...(d|efvar ts|
|000006b0| 68 65 6c 6c 2d 64 65 6c | 69 6d 69 74 65 72 2d 61 |hell-del|imiter-a|
|000006c0| 72 67 75 6d 65 6e 74 2d | 6c 69 73 74 20 27 28 3f |rgument-|list '(?|
|000006d0| 5c 7c 20 3f 5c 26 20 3f | 5c 3c 20 3f 5c 3e 20 3f |\| ?\& ?|\< ?\> ?|
|000006e0| 5c 28 20 3f 5c 29 20 3f | 5c 3b 29 20 28 23 24 20 |\( ?\) ?|\;) (#$ |
|000006f0| 2e 20 31 34 36 32 29 29 | 0a 23 40 31 39 32 20 4c |. 1462))|.#@192 L|
|00000700| 69 73 74 20 6f 66 20 66 | 75 6e 63 74 69 6f 6e 73 |ist of f|unctions|
|00000710| 20 63 61 6c 6c 65 64 20 | 74 6f 20 70 65 72 66 6f | called |to perfo|
|00000720| 72 6d 20 63 6f 6d 70 6c | 65 74 69 6f 6e 2e 0a 54 |rm compl|etion..T|
|00000730| 68 69 73 20 76 61 72 69 | 61 62 6c 65 20 69 73 20 |his vari|able is |
|00000740| 75 73 65 64 20 74 6f 20 | 69 6e 69 74 69 61 6c 69 |used to |initiali|
|00000750| 73 65 20 60 74 65 72 6d | 2d 64 79 6e 61 6d 69 63 |se `term|-dynamic|
|00000760| 2d 63 6f 6d 70 6c 65 74 | 65 2d 66 75 6e 63 74 69 |-complet|e-functi|
|00000770| 6f 6e 73 27 20 69 6e 20 | 74 68 65 0a 73 68 65 6c |ons' in |the.shel|
|00000780| 6c 20 62 75 66 66 65 72 | 2e 0a 0a 54 68 69 73 20 |l buffer|...This |
|00000790| 69 73 20 61 20 66 69 6e | 65 20 74 68 69 6e 67 20 |is a fin|e thing |
|000007a0| 74 6f 20 73 65 74 20 69 | 6e 20 79 6f 75 72 20 60 |to set i|n your `|
|000007b0| 2e 65 6d 61 63 73 27 20 | 66 69 6c 65 2e 1f 0a 28 |.emacs' |file...(|
|000007c0| 64 65 66 76 61 72 20 74 | 73 68 65 6c 6c 2d 64 79 |defvar t|shell-dy|
|000007d0| 6e 61 6d 69 63 2d 63 6f | 6d 70 6c 65 74 65 2d 66 |namic-co|mplete-f|
|000007e0| 75 6e 63 74 69 6f 6e 73 | 20 27 28 74 65 72 6d 2d |unctions| '(term-|
|000007f0| 72 65 70 6c 61 63 65 2d | 62 79 2d 65 78 70 61 6e |replace-|by-expan|
|00000800| 64 65 64 2d 68 69 73 74 | 6f 72 79 20 74 73 68 65 |ded-hist|ory tshe|
|00000810| 6c 6c 2d 64 79 6e 61 6d | 69 63 2d 63 6f 6d 70 6c |ll-dynam|ic-compl|
|00000820| 65 74 65 2d 65 6e 76 69 | 72 6f 6e 6d 65 6e 74 2d |ete-envi|ronment-|
|00000830| 76 61 72 69 61 62 6c 65 | 20 74 73 68 65 6c 6c 2d |variable| tshell-|
|00000840| 64 79 6e 61 6d 69 63 2d | 63 6f 6d 70 6c 65 74 65 |dynamic-|complete|
|00000850| 2d 63 6f 6d 6d 61 6e 64 | 20 74 73 68 65 6c 6c 2d |-command| tshell-|
|00000860| 72 65 70 6c 61 63 65 2d | 62 79 2d 65 78 70 61 6e |replace-|by-expan|
|00000870| 64 65 64 2d 64 69 72 65 | 63 74 6f 72 79 20 74 65 |ded-dire|ctory te|
|00000880| 72 6d 2d 64 79 6e 61 6d | 69 63 2d 63 6f 6d 70 6c |rm-dynam|ic-compl|
|00000890| 65 74 65 2d 66 69 6c 65 | 6e 61 6d 65 29 20 28 23 |ete-file|name) (#|
|000008a0| 24 20 2e 20 31 37 39 31 | 29 29 0a 23 40 31 32 31 |$ . 1791|)).#@121|
|000008b0| 20 2a 52 65 67 65 78 70 | 20 74 6f 20 6d 61 74 63 | *Regexp| to matc|
|000008c0| 68 20 61 20 73 69 6e 67 | 6c 65 20 63 6f 6d 6d 61 |h a sing|le comma|
|000008d0| 6e 64 20 77 69 74 68 69 | 6e 20 61 20 70 69 70 65 |nd withi|n a pipe|
|000008e0| 6c 69 6e 65 2e 0a 54 68 | 69 73 20 69 73 20 75 73 |line..Th|is is us|
|000008f0| 65 64 20 66 6f 72 20 64 | 69 72 65 63 74 6f 72 79 |ed for d|irectory|
|00000900| 20 74 72 61 63 6b 69 6e | 67 20 61 6e 64 20 64 6f | trackin|g and do|
|00000910| 65 73 20 6e 6f 74 20 64 | 6f 20 61 20 70 65 72 66 |es not d|o a perf|
|00000920| 65 63 74 20 6a 6f 62 2e | 1f 0a 28 64 65 66 76 61 |ect job.|..(defva|
|00000930| 72 20 73 68 65 6c 6c 2d | 63 6f 6d 6d 61 6e 64 2d |r shell-|command-|
|00000940| 72 65 67 65 78 70 20 22 | 5b 5e 3b 26 7c 5c 6e 5d |regexp "|[^;&|\n]|
|00000950| 2b 22 20 28 23 24 20 2e | 20 2d 32 32 32 35 29 29 |+" (#$ .| -2225))|
|00000960| 0a 23 40 31 38 37 20 2a | 49 66 20 6e 6f 6e 2d 6e |.#@187 *|If non-n|
|00000970| 69 6c 2c 20 75 73 65 20 | 65 78 65 63 75 74 61 62 |il, use |executab|
|00000980| 6c 65 20 66 69 6c 65 73 | 20 6f 6e 6c 79 20 66 6f |le files| only fo|
|00000990| 72 20 63 6f 6d 70 6c 65 | 74 69 6f 6e 20 63 61 6e |r comple|tion can|
|000009a0| 64 69 64 61 74 65 73 2e | 0a 54 68 69 73 20 6d 69 |didates.|.This mi|
|000009b0| 72 72 6f 72 73 20 74 68 | 65 20 6f 70 74 69 6f 6e |rrors th|e option|
|000009c0| 61 6c 20 62 65 68 61 76 | 69 6f 72 20 6f 66 20 74 |al behav|ior of t|
|000009d0| 63 73 68 2e 0a 0a 44 65 | 74 65 63 74 69 6e 67 20 |csh...De|tecting |
|000009e0| 65 78 65 63 75 74 61 62 | 69 6c 69 74 79 20 6f 66 |executab|ility of|
|000009f0| 20 66 69 6c 65 73 20 6d | 61 79 20 73 6c 6f 77 20 | files m|ay slow |
|00000a00| 63 6f 6d 6d 61 6e 64 20 | 63 6f 6d 70 6c 65 74 69 |command |completi|
|00000a10| 6f 6e 20 63 6f 6e 73 69 | 64 65 72 61 62 6c 79 2e |on consi|derably.|
|00000a20| 1f 0a 28 64 65 66 76 61 | 72 20 73 68 65 6c 6c 2d |..(defva|r shell-|
|00000a30| 63 6f 6d 70 6c 65 74 69 | 6f 6e 2d 65 78 65 63 6f |completi|on-execo|
|00000a40| 6e 6c 79 20 74 20 28 23 | 24 20 2e 20 2d 32 34 30 |nly t (#|$ . -240|
|00000a50| 37 29 29 0a 23 40 35 36 | 20 2a 52 65 67 65 78 70 |7)).#@56| *Regexp|
|00000a60| 20 74 6f 20 6d 61 74 63 | 68 20 73 75 62 73 68 65 | to matc|h subshe|
|00000a70| 6c 6c 20 63 6f 6d 6d 61 | 6e 64 73 20 65 71 75 69 |ll comma|nds equi|
|00000a80| 76 61 6c 65 6e 74 20 74 | 6f 20 70 6f 70 64 2e 1f |valent t|o popd..|
|00000a90| 0a 28 64 65 66 76 61 72 | 20 73 68 65 6c 6c 2d 70 |.(defvar| shell-p|
|00000aa0| 6f 70 64 2d 72 65 67 65 | 78 70 20 22 70 6f 70 64 |opd-rege|xp "popd|
|00000ab0| 22 20 28 23 24 20 2e 20 | 2d 32 36 34 39 29 29 0a |" (#$ . |-2649)).|
|00000ac0| 23 40 35 37 20 2a 52 65 | 67 65 78 70 20 74 6f 20 |#@57 *Re|gexp to |
|00000ad0| 6d 61 74 63 68 20 73 75 | 62 73 68 65 6c 6c 20 63 |match su|bshell c|
|00000ae0| 6f 6d 6d 61 6e 64 73 20 | 65 71 75 69 76 61 6c 65 |ommands |equivale|
|00000af0| 6e 74 20 74 6f 20 70 75 | 73 68 64 2e 1f 0a 28 64 |nt to pu|shd...(d|
|00000b00| 65 66 76 61 72 20 73 68 | 65 6c 6c 2d 70 75 73 68 |efvar sh|ell-push|
|00000b10| 64 2d 72 65 67 65 78 70 | 20 22 70 75 73 68 64 22 |d-regexp| "pushd"|
|00000b20| 20 28 23 24 20 2e 20 2d | 32 37 35 37 29 29 0a 23 | (#$ . -|2757)).#|
|00000b30| 40 31 31 32 20 2a 49 66 | 20 6e 6f 6e 2d 6e 69 6c |@112 *If| non-nil|
|00000b40| 2c 20 6d 61 6b 65 20 70 | 75 73 68 64 20 77 69 74 |, make p|ushd wit|
|00000b50| 68 20 6e 6f 20 61 72 67 | 20 62 65 68 61 76 65 20 |h no arg| behave |
|00000b60| 61 73 20 22 70 75 73 68 | 64 20 7e 22 20 28 6c 69 |as "push|d ~" (li|
|00000b70| 6b 65 20 63 64 29 2e 0a | 54 68 69 73 20 6d 69 72 |ke cd)..|This mir|
|00000b80| 72 6f 72 73 20 74 68 65 | 20 6f 70 74 69 6f 6e 61 |rors the| optiona|
|00000b90| 6c 20 62 65 68 61 76 69 | 6f 72 20 6f 66 20 74 63 |l behavi|or of tc|
|00000ba0| 73 68 2e 1f 0a 28 64 65 | 66 76 61 72 20 73 68 65 |sh...(de|fvar she|
|00000bb0| 6c 6c 2d 70 75 73 68 64 | 2d 74 6f 68 6f 6d 65 20 |ll-pushd|-tohome |
|00000bc0| 6e 69 6c 20 28 23 24 20 | 2e 20 2d 32 38 36 39 29 |nil (#$ |. -2869)|
|00000bd0| 29 0a 23 40 31 30 38 20 | 2a 49 66 20 6e 6f 6e 2d |).#@108 |*If non-|
|00000be0| 6e 69 6c 2c 20 6d 61 6b | 65 20 22 70 75 73 68 64 |nil, mak|e "pushd|
|00000bf0| 20 2b 6e 22 20 70 6f 70 | 20 74 68 65 20 6e 74 68 | +n" pop| the nth|
|00000c00| 20 64 69 72 20 74 6f 20 | 74 68 65 20 73 74 61 63 | dir to |the stac|
|00000c10| 6b 20 74 6f 70 2e 0a 54 | 68 69 73 20 6d 69 72 72 |k top..T|his mirr|
|00000c20| 6f 72 73 20 74 68 65 20 | 6f 70 74 69 6f 6e 61 6c |ors the |optional|
|00000c30| 20 62 65 68 61 76 69 6f | 72 20 6f 66 20 74 63 73 | behavio|r of tcs|
|00000c40| 68 2e 1f 0a 28 64 65 66 | 76 61 72 20 73 68 65 6c |h...(def|var shel|
|00000c50| 6c 2d 70 75 73 68 64 2d | 64 65 78 74 72 61 63 74 |l-pushd-|dextract|
|00000c60| 20 6e 69 6c 20 28 23 24 | 20 2e 20 2d 33 30 33 32 | nil (#$| . -3032|
|00000c70| 29 29 0a 23 40 31 31 31 | 20 2a 49 66 20 6e 6f 6e |)).#@111| *If non|
|00000c80| 2d 6e 69 6c 2c 20 6d 61 | 6b 65 20 70 75 73 68 64 |-nil, ma|ke pushd|
|00000c90| 20 6f 6e 6c 79 20 61 64 | 64 20 75 6e 69 71 75 65 | only ad|d unique|
|00000ca0| 20 64 69 72 65 63 74 6f | 72 69 65 73 20 74 6f 20 | directo|ries to |
|00000cb0| 74 68 65 20 73 74 61 63 | 6b 2e 0a 54 68 69 73 20 |the stac|k..This |
|00000cc0| 6d 69 72 72 6f 72 73 20 | 74 68 65 20 6f 70 74 69 |mirrors |the opti|
|00000cd0| 6f 6e 61 6c 20 62 65 68 | 61 76 69 6f 72 20 6f 66 |onal beh|avior of|
|00000ce0| 20 74 63 73 68 2e 1f 0a | 28 64 65 66 76 61 72 20 | tcsh...|(defvar |
|00000cf0| 73 68 65 6c 6c 2d 70 75 | 73 68 64 2d 64 75 6e 69 |shell-pu|shd-duni|
|00000d00| 71 75 65 20 6e 69 6c 20 | 28 23 24 20 2e 20 2d 33 |que nil |(#$ . -3|
|00000d10| 31 39 33 29 29 0a 23 40 | 35 34 20 2a 52 65 67 65 |193)).#@|54 *Rege|
|00000d20| 78 70 20 74 6f 20 6d 61 | 74 63 68 20 73 75 62 73 |xp to ma|tch subs|
|00000d30| 68 65 6c 6c 20 63 6f 6d | 6d 61 6e 64 73 20 65 71 |hell com|mands eq|
|00000d40| 75 69 76 61 6c 65 6e 74 | 20 74 6f 20 63 64 2e 1f |uivalent| to cd..|
|00000d50| 0a 28 64 65 66 76 61 72 | 20 73 68 65 6c 6c 2d 63 |.(defvar| shell-c|
|00000d60| 64 2d 72 65 67 65 78 70 | 20 22 63 64 22 20 28 23 |d-regexp| "cd" (#|
|00000d70| 24 20 2e 20 2d 33 33 35 | 35 29 29 0a 23 40 31 31 |$ . -335|5)).#@11|
|00000d80| 34 20 2a 41 72 67 73 20 | 70 61 73 73 65 64 20 74 |4 *Args |passed t|
|00000d90| 6f 20 69 6e 66 65 72 69 | 6f 72 20 73 68 65 6c 6c |o inferi|or shell|
|00000da0| 20 62 79 20 4d 2d 78 20 | 74 73 68 65 6c 6c 2c 20 | by M-x |tshell, |
|00000db0| 69 66 20 74 68 65 20 73 | 68 65 6c 6c 20 69 73 20 |if the s|hell is |
|00000dc0| 63 73 68 2e 0a 56 61 6c | 75 65 20 69 73 20 61 20 |csh..Val|ue is a |
|00000dd0| 6c 69 73 74 20 6f 66 20 | 73 74 72 69 6e 67 73 2c |list of |strings,|
|00000de0| 20 77 68 69 63 68 20 6d | 61 79 20 62 65 20 6e 69 | which m|ay be ni|
|00000df0| 6c 2e 1f 0a 28 64 65 66 | 76 61 72 20 65 78 70 6c |l...(def|var expl|
|00000e00| 69 63 69 74 2d 63 73 68 | 2d 61 72 67 73 20 28 62 |icit-csh|-args (b|
|00000e10| 79 74 65 2d 63 6f 64 65 | 20 22 08 c1 61 ab 82 c2 |yte-code| "..a...|
|00000e20| 87 c3 87 22 20 5b 73 79 | 73 74 65 6d 2d 74 79 70 |..." [sy|stem-typ|
|00000e30| 65 20 68 70 75 78 20 28 | 22 2d 69 22 20 22 2d 54 |e hpux (|"-i" "-T|
|00000e40| 22 29 20 28 22 2d 69 22 | 29 5d 20 32 29 20 28 23 |") ("-i"|)] 2) (#|
|00000e50| 24 20 2e 20 2d 33 34 35 | 38 29 29 0a 23 40 34 34 |$ . -345|8)).#@44|
|00000e60| 37 20 2a 49 66 20 6e 6f | 6e 2d 6e 69 6c 2c 20 65 |7 *If no|n-nil, e|
|00000e70| 78 70 61 6e 64 20 69 6e | 70 75 74 20 63 6f 6d 6d |xpand in|put comm|
|00000e80| 61 6e 64 20 68 69 73 74 | 6f 72 79 20 72 65 66 65 |and hist|ory refe|
|00000e90| 72 65 6e 63 65 73 20 6f | 6e 20 63 6f 6d 70 6c 65 |rences o|n comple|
|00000ea0| 74 69 6f 6e 2e 0a 54 68 | 69 73 20 6d 69 72 72 6f |tion..Th|is mirro|
|00000eb0| 72 73 20 74 68 65 20 6f | 70 74 69 6f 6e 61 6c 20 |rs the o|ptional |
|00000ec0| 62 65 68 61 76 69 6f 72 | 20 6f 66 20 74 63 73 68 |behavior| of tcsh|
|00000ed0| 20 28 69 74 73 20 61 75 | 74 6f 65 78 70 61 6e 64 | (its au|toexpand|
|00000ee0| 20 61 6e 64 20 68 69 73 | 74 6c 69 74 29 2e 0a 0a | and his|tlit)...|
|00000ef0| 49 66 20 74 68 65 20 76 | 61 6c 75 65 20 69 73 20 |If the v|alue is |
|00000f00| 60 69 6e 70 75 74 27 2c | 20 74 68 65 6e 20 74 68 |`input',| then th|
|00000f10| 65 20 65 78 70 61 6e 73 | 69 6f 6e 20 69 73 20 73 |e expans|ion is s|
|00000f20| 65 65 6e 20 6f 6e 20 69 | 6e 70 75 74 2e 0a 49 66 |een on i|nput..If|
|00000f30| 20 74 68 65 20 76 61 6c | 75 65 20 69 73 20 60 68 | the val|ue is `h|
|00000f40| 69 73 74 6f 72 79 27 2c | 20 74 68 65 6e 20 74 68 |istory',| then th|
|00000f50| 65 20 65 78 70 61 6e 73 | 69 6f 6e 20 69 73 20 6f |e expans|ion is o|
|00000f60| 6e 6c 79 20 77 68 65 6e | 20 69 6e 73 65 72 74 69 |nly when| inserti|
|00000f70| 6e 67 0a 69 6e 74 6f 20 | 74 68 65 20 62 75 66 66 |ng.into |the buff|
|00000f80| 65 72 27 73 20 69 6e 70 | 75 74 20 72 69 6e 67 2e |er's inp|ut ring.|
|00000f90| 20 20 53 65 65 20 61 6c | 73 6f 20 60 74 65 72 6d | See al|so `term|
|00000fa0| 2d 6d 61 67 69 63 2d 73 | 70 61 63 65 27 20 61 6e |-magic-s|pace' an|
|00000fb0| 64 0a 60 74 65 72 6d 2d | 64 79 6e 61 6d 69 63 2d |d.`term-|dynamic-|
|00000fc0| 63 6f 6d 70 6c 65 74 65 | 27 2e 0a 0a 54 68 69 73 |complete|'...This|
|00000fd0| 20 76 61 72 69 61 62 6c | 65 20 73 75 70 70 6c 69 | variabl|e suppli|
|00000fe0| 65 73 20 61 20 64 65 66 | 61 75 6c 74 20 66 6f 72 |es a def|ault for|
|00000ff0| 20 60 74 65 72 6d 2d 69 | 6e 70 75 74 2d 61 75 74 | `term-i|nput-aut|
|00001000| 6f 65 78 70 61 6e 64 27 | 2c 0a 66 6f 72 20 54 73 |oexpand'|,.for Ts|
|00001010| 68 65 6c 6c 20 6d 6f 64 | 65 20 6f 6e 6c 79 2e 1f |hell mod|e only..|
|00001020| 0a 28 64 65 66 76 61 72 | 20 74 73 68 65 6c 6c 2d |.(defvar| tshell-|
|00001030| 69 6e 70 75 74 2d 61 75 | 74 6f 65 78 70 61 6e 64 |input-au|toexpand|
|00001040| 20 27 68 69 73 74 6f 72 | 79 20 28 23 24 20 2e 20 | 'histor|y (#$ . |
|00001050| 2d 33 36 38 32 29 29 0a | 23 40 31 31 39 20 4c 69 |-3682)).|#@119 Li|
|00001060| 73 74 20 6f 66 20 64 69 | 72 65 63 74 6f 72 69 65 |st of di|rectorie|
|00001070| 73 20 73 61 76 65 64 20 | 62 79 20 70 75 73 68 64 |s saved |by pushd|
|00001080| 20 69 6e 20 74 68 69 73 | 20 62 75 66 66 65 72 27 | in this| buffer'|
|00001090| 73 20 73 68 65 6c 6c 2e | 0a 54 68 75 73 2c 20 74 |s shell.|.Thus, t|
|000010a0| 68 69 73 20 64 6f 65 73 | 20 6e 6f 74 20 69 6e 63 |his does| not inc|
|000010b0| 6c 75 64 65 20 74 68 65 | 20 73 68 65 6c 6c 27 73 |lude the| shell's|
|000010c0| 20 63 75 72 72 65 6e 74 | 20 64 69 72 65 63 74 6f | current| directo|
|000010d0| 72 79 2e 1f 0a 28 64 65 | 66 76 61 72 20 74 73 68 |ry...(de|fvar tsh|
|000010e0| 65 6c 6c 2d 64 69 72 73 | 74 61 63 6b 20 6e 69 6c |ell-dirs|tack nil|
|000010f0| 20 28 23 24 20 2e 20 34 | 31 39 30 29 29 0a 23 40 | (#$ . 4|190)).#@|
|00001100| 36 34 20 4e 6f 6e 2d 6e | 69 6c 20 69 6e 20 61 20 |64 Non-n|il in a |
|00001110| 73 68 65 6c 6c 20 62 75 | 66 66 65 72 20 6d 65 61 |shell bu|ffer mea|
|00001120| 6e 73 20 64 69 72 65 63 | 74 6f 72 79 20 74 72 61 |ns direc|tory tra|
|00001130| 63 6b 69 6e 67 20 69 73 | 20 65 6e 61 62 6c 65 64 |cking is| enabled|
|00001140| 2e 1f 0a 28 64 65 66 76 | 61 72 20 74 73 68 65 6c |...(defv|ar tshel|
|00001150| 6c 2d 64 69 72 74 72 61 | 63 6b 70 20 74 20 28 23 |l-dirtra|ckp t (#|
|00001160| 24 20 2e 20 34 33 35 35 | 29 29 0a 23 40 35 34 20 |$ . 4355|)).#@54 |
|00001170| 4b 65 65 70 20 74 72 61 | 63 6b 20 6f 66 20 6c 61 |Keep tra|ck of la|
|00001180| 73 74 20 64 69 72 65 63 | 74 6f 72 79 20 66 6f 72 |st direc|tory for|
|00001190| 20 6b 73 68 20 60 63 64 | 20 2d 27 20 63 6f 6d 6d | ksh `cd| -' comm|
|000011a0| 61 6e 64 2e 1f 0a 28 64 | 65 66 76 61 72 20 74 73 |and...(d|efvar ts|
|000011b0| 68 65 6c 6c 2d 6c 61 73 | 74 2d 64 69 72 20 6e 69 |hell-las|t-dir ni|
|000011c0| 6c 20 28 23 24 20 2e 20 | 34 34 36 34 29 29 0a 23 |l (#$ . |4464)).#|
|000011d0| 40 35 37 20 43 6f 6d 6d | 61 6e 64 20 75 73 65 64 |@57 Comm|and used|
|000011e0| 20 62 79 20 60 74 73 68 | 65 6c 6c 2d 72 65 73 79 | by `tsh|ell-resy|
|000011f0| 6e 63 2d 64 69 72 27 20 | 74 6f 20 71 75 65 72 79 |nc-dir' |to query|
|00001200| 20 74 68 65 20 73 68 65 | 6c 6c 2e 1f 0a 28 64 65 | the she|ll...(de|
|00001210| 66 76 61 72 20 74 73 68 | 65 6c 6c 2d 64 69 72 73 |fvar tsh|ell-dirs|
|00001220| 74 61 63 6b 2d 71 75 65 | 72 79 20 6e 69 6c 20 28 |tack-que|ry nil (|
|00001230| 23 24 20 2e 20 34 35 36 | 34 29 29 0a 28 62 79 74 |#$ . 456|4)).(byt|
|00001240| 65 2d 63 6f 64 65 20 22 | c0 c1 21 ac 82 c2 11 c1 |e-code "|..!.....|
|00001250| 0b 42 13 09 ac 9c c4 0d | 21 11 c6 09 c7 c8 23 88 |.B......|!.....#.|
|00001260| c6 09 c9 ca 23 88 c6 09 | cb cc 23 88 c6 09 cd ce |....#...|..#.....|
|00001270| 23 88 c2 87 22 20 5b 62 | 6f 75 6e 64 70 20 74 73 |#..." [b|oundp ts|
|00001280| 68 65 6c 6c 2d 6d 6f 64 | 65 2d 6d 61 70 20 6e 69 |hell-mod|e-map ni|
|00001290| 6c 20 63 75 72 72 65 6e | 74 2d 6c 6f 61 64 2d 6c |l curren|t-load-l|
|000012a0| 69 73 74 20 63 6f 70 79 | 2d 6b 65 79 6d 61 70 20 |ist copy|-keymap |
|000012b0| 74 65 72 6d 2d 6d 6f 64 | 65 2d 6d 61 70 20 64 65 |term-mod|e-map de|
|000012c0| 66 69 6e 65 2d 6b 65 79 | 20 22 03 06 22 20 74 73 |fine-key| ".." ts|
|000012d0| 68 65 6c 6c 2d 66 6f 72 | 77 61 72 64 2d 63 6f 6d |hell-for|ward-com|
|000012e0| 6d 61 6e 64 20 22 03 02 | 22 20 74 73 68 65 6c 6c |mand "..|" tshell|
|000012f0| 2d 62 61 63 6b 77 61 72 | 64 2d 63 6f 6d 6d 61 6e |-backwar|d-comman|
|00001300| 64 20 22 09 22 20 74 65 | 72 6d 2d 64 79 6e 61 6d |d "." te|rm-dynam|
|00001310| 69 63 2d 63 6f 6d 70 6c | 65 74 65 20 22 bf 22 20 |ic-compl|ete "." |
|00001320| 74 65 72 6d 2d 64 79 6e | 61 6d 69 63 2d 6c 69 73 |term-dyn|amic-lis|
|00001330| 74 2d 66 69 6c 65 6e 61 | 6d 65 2d 63 6f 6d 70 6c |t-filena|me-compl|
|00001340| 65 74 69 6f 6e 73 5d 20 | 34 29 0a 23 40 33 36 20 |etions] |4).#@36 |
|00001350| 2a 48 6f 6f 6b 20 66 6f | 72 20 63 75 73 74 6f 6d |*Hook fo|r custom|
|00001360| 69 73 69 6e 67 20 54 73 | 68 65 6c 6c 20 6d 6f 64 |ising Ts|hell mod|
|00001370| 65 2e 1f 0a 28 64 65 66 | 76 61 72 20 74 73 68 65 |e...(def|var tshe|
|00001380| 6c 6c 2d 6d 6f 64 65 2d | 68 6f 6f 6b 20 6e 69 6c |ll-mode-|hook nil|
|00001390| 20 28 23 24 20 2e 20 2d | 34 39 34 34 29 29 0a 23 | (#$ . -|4944)).#|
|000013a0| 40 32 30 31 37 20 4d 61 | 6a 6f 72 20 6d 6f 64 65 |@2017 Ma|jor mode|
|000013b0| 20 66 6f 72 20 69 6e 74 | 65 72 61 63 74 69 6e 67 | for int|eracting|
|000013c0| 20 77 69 74 68 20 61 6e | 20 69 6e 66 65 72 69 6f | with an| inferio|
|000013d0| 72 20 73 68 65 6c 6c 2e | 0a 52 65 74 75 72 6e 20 |r shell.|.Return |
|000013e0| 61 66 74 65 72 20 74 68 | 65 20 65 6e 64 20 6f 66 |after th|e end of|
|000013f0| 20 74 68 65 20 70 72 6f | 63 65 73 73 27 20 6f 75 | the pro|cess' ou|
|00001400| 74 70 75 74 20 73 65 6e | 64 73 20 74 68 65 20 74 |tput sen|ds the t|
|00001410| 65 78 74 20 66 72 6f 6d | 20 74 68 65 20 0a 20 20 |ext from| the . |
|00001420| 20 20 65 6e 64 20 6f 66 | 20 70 72 6f 63 65 73 73 | end of| process|
|00001430| 20 74 6f 20 74 68 65 20 | 65 6e 64 20 6f 66 20 74 | to the |end of t|
|00001440| 68 65 20 63 75 72 72 65 | 6e 74 20 6c 69 6e 65 2e |he curre|nt line.|
|00001450| 0a 52 65 74 75 72 6e 20 | 62 65 66 6f 72 65 20 65 |.Return |before e|
|00001460| 6e 64 20 6f 66 20 70 72 | 6f 63 65 73 73 20 6f 75 |nd of pr|ocess ou|
|00001470| 74 70 75 74 20 63 6f 70 | 69 65 73 20 74 68 65 20 |tput cop|ies the |
|00001480| 63 75 72 72 65 6e 74 20 | 6c 69 6e 65 20 28 65 78 |current |line (ex|
|00001490| 63 65 70 74 0a 20 20 20 | 20 66 6f 72 20 74 68 65 |cept. | for the|
|000014a0| 20 70 72 6f 6d 70 74 29 | 20 74 6f 20 74 68 65 20 | prompt)| to the |
|000014b0| 65 6e 64 20 6f 66 20 74 | 68 65 20 62 75 66 66 65 |end of t|he buffe|
|000014c0| 72 20 61 6e 64 20 73 65 | 6e 64 73 20 69 74 2e 0a |r and se|nds it..|
|000014d0| 4d 2d 78 20 74 65 72 6d | 2d 73 65 6e 64 2d 69 6e |M-x term|-send-in|
|000014e0| 76 69 73 69 62 6c 65 20 | 72 65 61 64 73 20 61 20 |visible |reads a |
|000014f0| 6c 69 6e 65 20 6f 66 20 | 74 65 78 74 20 77 69 74 |line of |text wit|
|00001500| 68 6f 75 74 20 65 63 68 | 6f 69 6e 67 20 69 74 2c |hout ech|oing it,|
|00001510| 0a 20 20 20 20 61 6e 64 | 20 73 65 6e 64 73 20 69 |. and| sends i|
|00001520| 74 20 74 6f 20 74 68 65 | 20 73 68 65 6c 6c 2e 20 |t to the| shell. |
|00001530| 20 54 68 69 73 20 69 73 | 20 75 73 65 66 75 6c 20 | This is| useful |
|00001540| 66 6f 72 20 65 6e 74 65 | 72 69 6e 67 20 70 61 73 |for ente|ring pas|
|00001550| 73 77 6f 72 64 73 2e 0a | 0a 49 66 20 79 6f 75 20 |swords..|.If you |
|00001560| 61 63 63 69 64 65 6e 74 | 61 6c 6c 79 20 73 75 73 |accident|ally sus|
|00001570| 70 65 6e 64 20 79 6f 75 | 72 20 70 72 6f 63 65 73 |pend you|r proces|
|00001580| 73 2c 20 75 73 65 20 5c | 5b 74 65 72 6d 2d 63 6f |s, use \|[term-co|
|00001590| 6e 74 69 6e 75 65 2d 73 | 75 62 6a 6f 62 5d 0a 74 |ntinue-s|ubjob].t|
|000015a0| 6f 20 63 6f 6e 74 69 6e | 75 65 20 69 74 2e 0a 0a |o contin|ue it...|
|000015b0| 63 64 2c 20 70 75 73 68 | 64 20 61 6e 64 20 70 6f |cd, push|d and po|
|000015c0| 70 64 20 63 6f 6d 6d 61 | 6e 64 73 20 67 69 76 65 |pd comma|nds give|
|000015d0| 6e 20 74 6f 20 74 68 65 | 20 73 68 65 6c 6c 20 61 |n to the| shell a|
|000015e0| 72 65 20 77 61 74 63 68 | 65 64 20 62 79 20 45 6d |re watch|ed by Em|
|000015f0| 61 63 73 20 74 6f 20 6b | 65 65 70 0a 74 68 69 73 |acs to k|eep.this|
|00001600| 20 62 75 66 66 65 72 27 | 73 20 64 65 66 61 75 6c | buffer'|s defaul|
|00001610| 74 20 64 69 72 65 63 74 | 6f 72 79 20 74 68 65 20 |t direct|ory the |
|00001620| 73 61 6d 65 20 61 73 20 | 74 68 65 20 73 68 65 6c |same as |the shel|
|00001630| 6c 27 73 20 77 6f 72 6b | 69 6e 67 20 64 69 72 65 |l's work|ing dire|
|00001640| 63 74 6f 72 79 2e 0a 4d | 2d 78 20 64 69 72 73 20 |ctory..M|-x dirs |
|00001650| 71 75 65 72 69 65 73 20 | 74 68 65 20 73 68 65 6c |queries |the shel|
|00001660| 6c 20 61 6e 64 20 72 65 | 73 79 6e 63 73 20 45 6d |l and re|syncs Em|
|00001670| 61 63 73 27 20 69 64 65 | 61 20 6f 66 20 77 68 61 |acs' ide|a of wha|
|00001680| 74 20 74 68 65 20 63 75 | 72 72 65 6e 74 20 0a 20 |t the cu|rrent . |
|00001690| 20 20 20 64 69 72 65 63 | 74 6f 72 79 20 73 74 61 | direc|tory sta|
|000016a0| 63 6b 20 69 73 2e 0a 4d | 2d 78 20 64 69 72 74 72 |ck is..M|-x dirtr|
|000016b0| 61 63 6b 2d 74 6f 67 67 | 6c 65 20 74 75 72 6e 73 |ack-togg|le turns|
|000016c0| 20 64 69 72 65 63 74 6f | 72 79 20 74 72 61 63 6b | directo|ry track|
|000016d0| 69 6e 67 20 6f 6e 20 61 | 6e 64 20 6f 66 66 2e 0a |ing on a|nd off..|
|000016e0| 0a 5c 7b 74 73 68 65 6c | 6c 2d 6d 6f 64 65 2d 6d |.\{tshel|l-mode-m|
|000016f0| 61 70 7d 0a 43 75 73 74 | 6f 6d 69 7a 61 74 69 6f |ap}.Cust|omizatio|
|00001700| 6e 3a 20 45 6e 74 72 79 | 20 74 6f 20 74 68 69 73 |n: Entry| to this|
|00001710| 20 6d 6f 64 65 20 72 75 | 6e 73 20 74 68 65 20 68 | mode ru|ns the h|
|00001720| 6f 6f 6b 73 20 6f 6e 20 | 60 74 65 72 6d 2d 6d 6f |ooks on |`term-mo|
|00001730| 64 65 2d 68 6f 6f 6b 27 | 20 61 6e 64 0a 60 74 73 |de-hook'| and.`ts|
|00001740| 68 65 6c 6c 2d 6d 6f 64 | 65 2d 68 6f 6f 6b 27 20 |hell-mod|e-hook' |
|00001750| 28 69 6e 20 74 68 61 74 | 20 6f 72 64 65 72 29 2e |(in that| order).|
|00001760| 20 20 42 65 66 6f 72 65 | 20 65 61 63 68 20 69 6e | Before| each in|
|00001770| 70 75 74 2c 20 74 68 65 | 20 68 6f 6f 6b 73 20 6f |put, the| hooks o|
|00001780| 6e 0a 60 74 65 72 6d 2d | 69 6e 70 75 74 2d 66 69 |n.`term-|input-fi|
|00001790| 6c 74 65 72 2d 66 75 6e | 63 74 69 6f 6e 73 27 20 |lter-fun|ctions' |
|000017a0| 61 72 65 20 72 75 6e 2e | 0a 0a 56 61 72 69 61 62 |are run.|..Variab|
|000017b0| 6c 65 73 20 60 73 68 65 | 6c 6c 2d 63 64 2d 72 65 |les `she|ll-cd-re|
|000017c0| 67 65 78 70 27 2c 20 60 | 73 68 65 6c 6c 2d 70 75 |gexp', `|shell-pu|
|000017d0| 73 68 64 2d 72 65 67 65 | 78 70 27 20 61 6e 64 20 |shd-rege|xp' and |
|000017e0| 60 73 68 65 6c 6c 2d 70 | 6f 70 64 2d 72 65 67 65 |`shell-p|opd-rege|
|000017f0| 78 70 27 0a 61 72 65 20 | 75 73 65 64 20 74 6f 20 |xp'.are |used to |
|00001800| 6d 61 74 63 68 20 74 68 | 65 69 72 20 72 65 73 70 |match th|eir resp|
|00001810| 65 63 74 69 76 65 20 63 | 6f 6d 6d 61 6e 64 73 2c |ective c|ommands,|
|00001820| 20 77 68 69 6c 65 20 60 | 73 68 65 6c 6c 2d 70 75 | while `|shell-pu|
|00001830| 73 68 64 2d 74 6f 68 6f | 6d 65 27 2c 0a 60 73 68 |shd-toho|me',.`sh|
|00001840| 65 6c 6c 2d 70 75 73 68 | 64 2d 64 65 78 74 72 61 |ell-push|d-dextra|
|00001850| 63 74 27 20 61 6e 64 20 | 60 73 68 65 6c 6c 2d 70 |ct' and |`shell-p|
|00001860| 75 73 68 64 2d 64 75 6e | 69 71 75 65 27 20 63 6f |ushd-dun|ique' co|
|00001870| 6e 74 72 6f 6c 20 74 68 | 65 20 62 65 68 61 76 69 |ntrol th|e behavi|
|00001880| 6f 72 20 6f 66 20 74 68 | 65 0a 72 65 6c 65 76 61 |or of th|e.releva|
|00001890| 6e 74 20 63 6f 6d 6d 61 | 6e 64 2e 0a 0a 56 61 72 |nt comma|nd...Var|
|000018a0| 69 61 62 6c 65 73 20 60 | 74 65 72 6d 2d 63 6f 6d |iables `|term-com|
|000018b0| 70 6c 65 74 69 6f 6e 2d | 61 75 74 6f 6c 69 73 74 |pletion-|autolist|
|000018c0| 27 2c 20 60 74 65 72 6d | 2d 63 6f 6d 70 6c 65 74 |', `term|-complet|
|000018d0| 69 6f 6e 2d 61 64 64 73 | 75 66 66 69 78 27 2c 0a |ion-adds|uffix',.|
|000018e0| 60 74 65 72 6d 2d 63 6f | 6d 70 6c 65 74 69 6f 6e |`term-co|mpletion|
|000018f0| 2d 72 65 63 65 78 61 63 | 74 27 20 61 6e 64 20 60 |-recexac|t' and `|
|00001900| 74 65 72 6d 2d 63 6f 6d | 70 6c 65 74 69 6f 6e 2d |term-com|pletion-|
|00001910| 66 69 67 6e 6f 72 65 27 | 20 63 6f 6e 74 72 6f 6c |fignore'| control|
|00001920| 20 74 68 65 0a 62 65 68 | 61 76 69 6f 72 20 6f 66 | the.beh|avior of|
|00001930| 20 66 69 6c 65 20 6e 61 | 6d 65 2c 20 63 6f 6d 6d | file na|me, comm|
|00001940| 61 6e 64 20 6e 61 6d 65 | 20 61 6e 64 20 76 61 72 |and name| and var|
|00001950| 69 61 62 6c 65 20 6e 61 | 6d 65 20 63 6f 6d 70 6c |iable na|me compl|
|00001960| 65 74 69 6f 6e 2e 20 20 | 56 61 72 69 61 62 6c 65 |etion. |Variable|
|00001970| 0a 60 73 68 65 6c 6c 2d | 63 6f 6d 70 6c 65 74 69 |.`shell-|completi|
|00001980| 6f 6e 2d 65 78 65 63 6f | 6e 6c 79 27 20 63 6f 6e |on-execo|nly' con|
|00001990| 74 72 6f 6c 73 20 74 68 | 65 20 62 65 68 61 76 69 |trols th|e behavi|
|000019a0| 6f 72 20 6f 66 20 63 6f | 6d 6d 61 6e 64 20 6e 61 |or of co|mmand na|
|000019b0| 6d 65 20 63 6f 6d 70 6c | 65 74 69 6f 6e 2e 0a 56 |me compl|etion..V|
|000019c0| 61 72 69 61 62 6c 65 20 | 60 74 73 68 65 6c 6c 2d |ariable |`tshell-|
|000019d0| 63 6f 6d 70 6c 65 74 69 | 6f 6e 2d 66 69 67 6e 6f |completi|on-figno|
|000019e0| 72 65 27 20 69 73 20 75 | 73 65 64 20 74 6f 20 69 |re' is u|sed to i|
|000019f0| 6e 69 74 69 61 6c 69 73 | 65 20 74 68 65 20 76 61 |nitialis|e the va|
|00001a00| 6c 75 65 20 6f 66 0a 60 | 74 65 72 6d 2d 63 6f 6d |lue of.`|term-com|
|00001a10| 70 6c 65 74 69 6f 6e 2d | 66 69 67 6e 6f 72 65 27 |pletion-|fignore'|
|00001a20| 2e 0a 0a 56 61 72 69 61 | 62 6c 65 73 20 60 74 65 |...Varia|bles `te|
|00001a30| 72 6d 2d 69 6e 70 75 74 | 2d 72 69 6e 67 2d 66 69 |rm-input|-ring-fi|
|00001a40| 6c 65 2d 6e 61 6d 65 27 | 20 61 6e 64 20 60 74 65 |le-name'| and `te|
|00001a50| 72 6d 2d 69 6e 70 75 74 | 2d 61 75 74 6f 65 78 70 |rm-input|-autoexp|
|00001a60| 61 6e 64 27 20 63 6f 6e | 74 72 6f 6c 0a 74 68 65 |and' con|trol.the|
|00001a70| 20 69 6e 69 74 69 61 6c | 69 73 61 74 69 6f 6e 20 | initial|isation |
|00001a80| 6f 66 20 74 68 65 20 69 | 6e 70 75 74 20 72 69 6e |of the i|nput rin|
|00001a90| 67 20 68 69 73 74 6f 72 | 79 2c 20 61 6e 64 20 68 |g histor|y, and h|
|00001aa0| 69 73 74 6f 72 79 20 65 | 78 70 61 6e 73 69 6f 6e |istory e|xpansion|
|00001ab0| 2e 0a 0a 56 61 72 69 61 | 62 6c 65 73 20 60 74 65 |...Varia|bles `te|
|00001ac0| 72 6d 2d 6f 75 74 70 75 | 74 2d 66 69 6c 74 65 72 |rm-outpu|t-filter|
|00001ad0| 2d 66 75 6e 63 74 69 6f | 6e 73 27 2c 20 61 20 68 |-functio|ns', a h|
|00001ae0| 6f 6f 6b 2c 20 61 6e 64 | 0a 60 74 65 72 6d 2d 73 |ook, and|.`term-s|
|00001af0| 63 72 6f 6c 6c 2d 74 6f | 2d 62 6f 74 74 6f 6d 2d |croll-to|-bottom-|
|00001b00| 6f 6e 2d 69 6e 70 75 74 | 27 20 61 6e 64 20 60 74 |on-input|' and `t|
|00001b10| 65 72 6d 2d 73 63 72 6f | 6c 6c 2d 74 6f 2d 62 6f |erm-scro|ll-to-bo|
|00001b20| 74 74 6f 6d 2d 6f 6e 2d | 6f 75 74 70 75 74 27 0a |ttom-on-|output'.|
|00001b30| 63 6f 6e 74 72 6f 6c 20 | 77 68 65 74 68 65 72 20 |control |whether |
|00001b40| 69 6e 70 75 74 20 61 6e | 64 20 6f 75 74 70 75 74 |input an|d output|
|00001b50| 20 63 61 75 73 65 20 74 | 68 65 20 77 69 6e 64 6f | cause t|he windo|
|00001b60| 77 20 74 6f 20 73 63 72 | 6f 6c 6c 20 74 6f 20 74 |w to scr|oll to t|
|00001b70| 68 65 20 65 6e 64 20 6f | 66 20 74 68 65 0a 62 75 |he end o|f the.bu|
|00001b80| 66 66 65 72 2e 1f 0a 28 | 64 65 66 61 6c 69 61 73 |ffer...(|defalias|
|00001b90| 20 27 74 73 68 65 6c 6c | 2d 6d 6f 64 65 20 23 5b | 'tshell|-mode #[|
|00001ba0| 6e 69 6c 20 22 c0 20 88 | c1 12 c3 14 c5 0e 06 21 |nil ". .|.......!|
|00001bb0| 88 0e 07 16 08 0e 09 16 | 5c 6e 0e 0b 16 0c 0e 0d |........|\n......|
|00001bc0| 16 0e cf d0 21 88 0e 08 | 16 10 cf d1 21 88 d2 16 |....!...|....!...|
|00001bd0| 11 d2 16 13 cf d4 21 88 | d5 16 14 d6 d7 d8 5c 22 |......!.|......\"|
|00001be0| 88 0e 19 16 1a db dc dd | 70 21 21 40 21 1e 1e df |........|p!!@!...|
|00001bf0| e0 21 ae 93 0e 1e e1 98 | ab 83 e2 aa 8a 0e 1e e3 |.!......|........|
|00001c00| 98 ab 83 e4 aa 81 e5 89 | 16 26 e7 6b ab 83 d2 16 |........|.&.k....|
|00001c10| 26 e8 e9 0e 1e 5c 22 ab | 83 ea aa 81 eb 16 2c 29 |&....\".|......,)|
|00001c20| ed ee 21 88 ef d5 21 87 | 22 20 5b 74 65 72 6d 2d |..!...!.|" [term-|
|00001c30| 6d 6f 64 65 20 74 73 68 | 65 6c 6c 2d 6d 6f 64 65 |mode tsh|ell-mode|
|00001c40| 20 6d 61 6a 6f 72 2d 6d | 6f 64 65 20 22 53 68 65 | major-m|ode "She|
|00001c50| 6c 6c 22 20 6d 6f 64 65 | 2d 6e 61 6d 65 20 75 73 |ll" mode|-name us|
|00001c60| 65 2d 6c 6f 63 61 6c 2d | 6d 61 70 20 74 73 68 65 |e-local-|map tshe|
|00001c70| 6c 6c 2d 6d 6f 64 65 2d | 6d 61 70 20 74 73 68 65 |ll-mode-|map tshe|
|00001c80| 6c 6c 2d 70 72 6f 6d 70 | 74 2d 70 61 74 74 65 72 |ll-promp|t-patter|
|00001c90| 6e 20 74 65 72 6d 2d 70 | 72 6f 6d 70 74 2d 72 65 |n term-p|rompt-re|
|00001ca0| 67 65 78 70 20 74 73 68 | 65 6c 6c 2d 63 6f 6d 70 |gexp tsh|ell-comp|
|00001cb0| 6c 65 74 69 6f 6e 2d 66 | 69 67 6e 6f 72 65 20 74 |letion-f|ignore t|
|00001cc0| 65 72 6d 2d 63 6f 6d 70 | 6c 65 74 69 6f 6e 2d 66 |erm-comp|letion-f|
|00001cd0| 69 67 6e 6f 72 65 20 74 | 73 68 65 6c 6c 2d 64 65 |ignore t|shell-de|
|00001ce0| 6c 69 6d 69 74 65 72 2d | 61 72 67 75 6d 65 6e 74 |limiter-|argument|
|00001cf0| 2d 6c 69 73 74 20 74 65 | 72 6d 2d 64 65 6c 69 6d |-list te|rm-delim|
|00001d00| 69 74 65 72 2d 61 72 67 | 75 6d 65 6e 74 2d 6c 69 |iter-arg|ument-li|
|00001d10| 73 74 20 74 73 68 65 6c | 6c 2d 64 79 6e 61 6d 69 |st tshel|l-dynami|
|00001d20| 63 2d 63 6f 6d 70 6c 65 | 74 65 2d 66 75 6e 63 74 |c-comple|te-funct|
|00001d30| 69 6f 6e 73 20 74 65 72 | 6d 2d 64 79 6e 61 6d 69 |ions ter|m-dynami|
|00001d40| 63 2d 63 6f 6d 70 6c 65 | 74 65 2d 66 75 6e 63 74 |c-comple|te-funct|
|00001d50| 69 6f 6e 73 20 6d 61 6b | 65 2d 6c 6f 63 61 6c 2d |ions mak|e-local-|
|00001d60| 76 61 72 69 61 62 6c 65 | 20 70 61 72 61 67 72 61 |variable| paragra|
|00001d70| 70 68 2d 73 74 61 72 74 | 20 74 73 68 65 6c 6c 2d |ph-start| tshell-|
|00001d80| 64 69 72 73 74 61 63 6b | 20 6e 69 6c 20 74 73 68 |dirstack| nil tsh|
|00001d90| 65 6c 6c 2d 6c 61 73 74 | 2d 64 69 72 20 74 73 68 |ell-last|-dir tsh|
|00001da0| 65 6c 6c 2d 64 69 72 74 | 72 61 63 6b 70 20 74 20 |ell-dirt|rackp t |
|00001db0| 61 64 64 2d 68 6f 6f 6b | 20 74 65 72 6d 2d 69 6e |add-hook| term-in|
|00001dc0| 70 75 74 2d 66 69 6c 74 | 65 72 2d 66 75 6e 63 74 |put-filt|er-funct|
|00001dd0| 69 6f 6e 73 20 74 73 68 | 65 6c 6c 2d 64 69 72 65 |ions tsh|ell-dire|
|00001de0| 63 74 6f 72 79 2d 74 72 | 61 63 6b 65 72 20 74 73 |ctory-tr|acker ts|
|00001df0| 68 65 6c 6c 2d 69 6e 70 | 75 74 2d 61 75 74 6f 65 |hell-inp|ut-autoe|
|00001e00| 78 70 61 6e 64 20 74 65 | 72 6d 2d 69 6e 70 75 74 |xpand te|rm-input|
|00001e10| 2d 61 75 74 6f 65 78 70 | 61 6e 64 20 66 69 6c 65 |-autoexp|and file|
|00001e20| 2d 6e 61 6d 65 2d 6e 6f | 6e 64 69 72 65 63 74 6f |-name-no|ndirecto|
|00001e30| 72 79 20 70 72 6f 63 65 | 73 73 2d 63 6f 6d 6d 61 |ry proce|ss-comma|
|00001e40| 6e 64 20 67 65 74 2d 62 | 75 66 66 65 72 2d 70 72 |nd get-b|uffer-pr|
|00001e50| 6f 63 65 73 73 20 73 68 | 65 6c 6c 20 67 65 74 65 |ocess sh|ell gete|
|00001e60| 6e 76 20 22 48 49 53 54 | 46 49 4c 45 22 20 22 62 |nv "HIST|FILE" "b|
|00001e70| 61 73 68 22 20 22 7e 2f | 2e 62 61 73 68 5f 68 69 |ash" "~/|.bash_hi|
|00001e80| 73 74 6f 72 79 22 20 22 | 6b 73 68 22 20 22 7e 2f |story" "|ksh" "~/|
|00001e90| 2e 73 68 5f 68 69 73 74 | 6f 72 79 22 20 22 7e 2f |.sh_hist|ory" "~/|
|00001ea0| 2e 68 69 73 74 6f 72 79 | 22 20 74 65 72 6d 2d 69 |.history|" term-i|
|00001eb0| 6e 70 75 74 2d 72 69 6e | 67 2d 66 69 6c 65 2d 6e |nput-rin|g-file-n|
|00001ec0| 61 6d 65 20 22 2f 64 65 | 76 2f 6e 75 6c 6c 22 20 |ame "/de|v/null" |
|00001ed0| 73 74 72 69 6e 67 2d 6d | 61 74 63 68 20 22 5e 6b |string-m|atch "^k|
|00001ee0| 3f 73 68 24 22 20 22 70 | 77 64 22 20 22 64 69 72 |?sh$" "p|wd" "dir|
|00001ef0| 73 22 20 74 73 68 65 6c | 6c 2d 64 69 72 73 74 61 |s" tshel|l-dirsta|
|00001f00| 63 6b 2d 71 75 65 72 79 | 20 72 75 6e 2d 68 6f 6f |ck-query| run-hoo|
|00001f10| 6b 73 20 74 73 68 65 6c | 6c 2d 6d 6f 64 65 2d 68 |ks tshel|l-mode-h|
|00001f20| 6f 6f 6b 20 74 65 72 6d | 2d 72 65 61 64 2d 69 6e |ook term|-read-in|
|00001f30| 70 75 74 2d 72 69 6e 67 | 5d 20 35 20 28 23 24 20 |put-ring|] 5 (#$ |
|00001f40| 2e 20 35 30 33 30 29 20 | 6e 69 6c 5d 29 0a 23 40 |. 5030) |nil]).#@|
|00001f50| 31 30 32 38 20 52 75 6e | 20 61 6e 20 69 6e 66 65 |1028 Run| an infe|
|00001f60| 72 69 6f 72 20 73 68 65 | 6c 6c 2c 20 77 69 74 68 |rior she|ll, with|
|00001f70| 20 49 2f 4f 20 74 68 72 | 6f 75 67 68 20 62 75 66 | I/O thr|ough buf|
|00001f80| 66 65 72 20 2a 73 68 65 | 6c 6c 2a 2e 0a 49 66 20 |fer *she|ll*..If |
|00001f90| 62 75 66 66 65 72 20 65 | 78 69 73 74 73 20 62 75 |buffer e|xists bu|
|00001fa0| 74 20 73 68 65 6c 6c 20 | 70 72 6f 63 65 73 73 20 |t shell |process |
|00001fb0| 69 73 20 6e 6f 74 20 72 | 75 6e 6e 69 6e 67 2c 20 |is not r|unning, |
|00001fc0| 6d 61 6b 65 20 6e 65 77 | 20 73 68 65 6c 6c 2e 0a |make new| shell..|
|00001fd0| 49 66 20 62 75 66 66 65 | 72 20 65 78 69 73 74 73 |If buffe|r exists|
|00001fe0| 20 61 6e 64 20 73 68 65 | 6c 6c 20 70 72 6f 63 65 | and she|ll proce|
|00001ff0| 73 73 20 69 73 20 72 75 | 6e 6e 69 6e 67 2c 20 6a |ss is ru|nning, j|
|00002000| 75 73 74 20 73 77 69 74 | 63 68 20 74 6f 20 62 75 |ust swit|ch to bu|
|00002010| 66 66 65 72 20 60 2a 73 | 68 65 6c 6c 2a 27 2e 0a |ffer `*s|hell*'..|
|00002020| 50 72 6f 67 72 61 6d 20 | 75 73 65 64 20 63 6f 6d |Program |used com|
|00002030| 65 73 20 66 72 6f 6d 20 | 76 61 72 69 61 62 6c 65 |es from |variable|
|00002040| 20 60 65 78 70 6c 69 63 | 69 74 2d 73 68 65 6c 6c | `explic|it-shell|
|00002050| 2d 66 69 6c 65 2d 6e 61 | 6d 65 27 2c 0a 20 6f 72 |-file-na|me',. or|
|00002060| 20 28 69 66 20 74 68 61 | 74 20 69 73 20 6e 69 6c | (if tha|t is nil|
|00002070| 29 20 66 72 6f 6d 20 74 | 68 65 20 45 53 48 45 4c |) from t|he ESHEL|
|00002080| 4c 20 65 6e 76 69 72 6f | 6e 6d 65 6e 74 20 76 61 |L enviro|nment va|
|00002090| 72 69 61 62 6c 65 2c 0a | 20 6f 72 20 65 6c 73 65 |riable,.| or else|
|000020a0| 20 66 72 6f 6d 20 53 48 | 45 4c 4c 20 69 66 20 74 | from SH|ELL if t|
|000020b0| 68 65 72 65 20 69 73 20 | 6e 6f 20 45 53 48 45 4c |here is |no ESHEL|
|000020c0| 4c 2e 0a 49 66 20 61 20 | 66 69 6c 65 20 60 7e 2f |L..If a |file `~/|
|000020d0| 2e 65 6d 61 63 73 5f 53 | 48 45 4c 4c 4e 41 4d 45 |.emacs_S|HELLNAME|
|000020e0| 27 20 65 78 69 73 74 73 | 2c 20 69 74 20 69 73 20 |' exists|, it is |
|000020f0| 67 69 76 65 6e 20 61 73 | 20 69 6e 69 74 69 61 6c |given as| initial|
|00002100| 20 69 6e 70 75 74 0a 20 | 28 4e 6f 74 65 20 74 68 | input. |(Note th|
|00002110| 61 74 20 74 68 69 73 20 | 6d 61 79 20 6c 6f 73 65 |at this |may lose|
|00002120| 20 64 75 65 20 74 6f 20 | 61 20 74 69 6d 69 6e 67 | due to |a timing|
|00002130| 20 65 72 72 6f 72 20 69 | 66 20 74 68 65 20 73 68 | error i|f the sh|
|00002140| 65 6c 6c 0a 20 20 64 69 | 73 63 61 72 64 73 20 69 |ell. di|scards i|
|00002150| 6e 70 75 74 20 77 68 65 | 6e 20 69 74 20 73 74 61 |nput whe|n it sta|
|00002160| 72 74 73 20 75 70 2e 29 | 0a 54 68 65 20 62 75 66 |rts up.)|.The buf|
|00002170| 66 65 72 20 69 73 20 70 | 75 74 20 69 6e 20 54 73 |fer is p|ut in Ts|
|00002180| 68 65 6c 6c 20 6d 6f 64 | 65 2c 20 67 69 76 69 6e |hell mod|e, givin|
|00002190| 67 20 63 6f 6d 6d 61 6e | 64 73 20 66 6f 72 20 73 |g comman|ds for s|
|000021a0| 65 6e 64 69 6e 67 20 69 | 6e 70 75 74 0a 61 6e 64 |ending i|nput.and|
|000021b0| 20 63 6f 6e 74 72 6f 6c | 6c 69 6e 67 20 74 68 65 | control|ling the|
|000021c0| 20 73 75 62 6a 6f 62 73 | 20 6f 66 20 74 68 65 20 | subjobs| of the |
|000021d0| 73 68 65 6c 6c 2e 20 20 | 53 65 65 20 60 74 73 68 |shell. |See `tsh|
|000021e0| 65 6c 6c 2d 6d 6f 64 65 | 27 2e 0a 53 65 65 20 61 |ell-mode|'..See a|
|000021f0| 6c 73 6f 20 74 68 65 20 | 76 61 72 69 61 62 6c 65 |lso the |variable|
|00002200| 20 60 74 73 68 65 6c 6c | 2d 70 72 6f 6d 70 74 2d | `tshell|-prompt-|
|00002210| 70 61 74 74 65 72 6e 27 | 2e 0a 0a 54 68 65 20 73 |pattern'|...The s|
|00002220| 68 65 6c 6c 20 66 69 6c | 65 20 6e 61 6d 65 20 28 |hell fil|e name (|
|00002230| 73 61 6e 73 20 64 69 72 | 65 63 74 6f 72 69 65 73 |sans dir|ectories|
|00002240| 29 20 69 73 20 75 73 65 | 64 20 74 6f 20 6d 61 6b |) is use|d to mak|
|00002250| 65 20 61 20 73 79 6d 62 | 6f 6c 20 6e 61 6d 65 0a |e a symb|ol name.|
|00002260| 73 75 63 68 20 61 73 20 | 60 65 78 70 6c 69 63 69 |such as |`explici|
|00002270| 74 2d 63 73 68 2d 61 72 | 67 73 27 2e 20 20 49 66 |t-csh-ar|gs'. If|
|00002280| 20 74 68 61 74 20 73 79 | 6d 62 6f 6c 20 69 73 20 | that sy|mbol is |
|00002290| 61 20 76 61 72 69 61 62 | 6c 65 2c 0a 69 74 73 20 |a variab|le,.its |
|000022a0| 76 61 6c 75 65 20 69 73 | 20 75 73 65 64 20 61 73 |value is| used as|
|000022b0| 20 61 20 6c 69 73 74 20 | 6f 66 20 61 72 67 75 6d | a list |of argum|
|000022c0| 65 6e 74 73 20 77 68 65 | 6e 20 69 6e 76 6f 6b 69 |ents whe|n invoki|
|000022d0| 6e 67 20 74 68 65 20 73 | 68 65 6c 6c 2e 0a 4f 74 |ng the s|hell..Ot|
|000022e0| 68 65 72 77 69 73 65 2c | 20 6f 6e 65 20 61 72 67 |herwise,| one arg|
|000022f0| 75 6d 65 6e 74 20 60 2d | 69 27 20 69 73 20 70 61 |ument `-|i' is pa|
|00002300| 73 73 65 64 20 74 6f 20 | 74 68 65 20 73 68 65 6c |ssed to |the shel|
|00002310| 6c 2e 0a 0a 28 54 79 70 | 65 20 5c 5b 64 65 73 63 |l...(Typ|e \[desc|
|00002320| 72 69 62 65 2d 6d 6f 64 | 65 5d 20 69 6e 20 74 68 |ribe-mod|e] in th|
|00002330| 65 20 73 68 65 6c 6c 20 | 62 75 66 66 65 72 20 66 |e shell |buffer f|
|00002340| 6f 72 20 61 20 6c 69 73 | 74 20 6f 66 20 63 6f 6d |or a lis|t of com|
|00002350| 6d 61 6e 64 73 2e 29 1f | 0a 28 64 65 66 61 6c 69 |mands.).|.(defali|
|00002360| 61 73 20 27 74 73 68 65 | 6c 6c 20 23 5b 6e 69 6c |as 'tshe|ll #[nil|
|00002370| 20 22 c0 c1 21 ac c9 5c | 6e ae 8b c3 c4 21 ae 86 | "..!..\|n....!..|
|00002380| c3 c5 21 ae 81 c6 1e 07 | c8 0e 07 21 1e 09 ca 0e |..!.....|...!....|
|00002390| 09 50 1e 0b cc cd 0e 09 | ce 51 21 1e 0f d0 d1 d2 |.P......|.Q!.....|
|000023a0| 0e 07 d3 0e 0b 21 ad 82 | 0e 0b 0e 0f ab 8b d4 0e |.....!..|........|
|000023b0| 0f 21 ab 85 0e 0f 4a aa | 81 d5 25 71 88 d6 20 88 |.!....J.|..%q.. .|
|000023c0| 2c d7 c1 21 87 22 20 5b | 74 65 72 6d 2d 63 68 65 |,..!." [|term-che|
|000023d0| 63 6b 2d 70 72 6f 63 20 | 22 2a 73 68 65 6c 6c 2a |ck-proc |"*shell*|
|000023e0| 22 20 65 78 70 6c 69 63 | 69 74 2d 73 68 65 6c 6c |" explic|it-shell|
|000023f0| 2d 66 69 6c 65 2d 6e 61 | 6d 65 20 67 65 74 65 6e |-file-na|me geten|
|00002400| 76 20 22 45 53 48 45 4c | 4c 22 20 22 53 48 45 4c |v "ESHEL|L" "SHEL|
|00002410| 4c 22 20 22 2f 62 69 6e | 2f 73 68 22 20 70 72 6f |L" "/bin|/sh" pro|
|00002420| 67 20 66 69 6c 65 2d 6e | 61 6d 65 2d 6e 6f 6e 64 |g file-n|ame-nond|
|00002430| 69 72 65 63 74 6f 72 79 | 20 6e 61 6d 65 20 22 7e |irectory| name "~|
|00002440| 2f 2e 65 6d 61 63 73 5f | 22 20 73 74 61 72 74 66 |/.emacs_|" startf|
|00002450| 69 6c 65 20 69 6e 74 65 | 72 6e 2d 73 6f 66 74 20 |ile inte|rn-soft |
|00002460| 22 65 78 70 6c 69 63 69 | 74 2d 22 20 22 2d 61 72 |"explici|t-" "-ar|
|00002470| 67 73 22 20 78 61 72 67 | 73 2d 6e 61 6d 65 20 61 |gs" xarg|s-name a|
|00002480| 70 70 6c 79 20 6d 61 6b | 65 2d 74 65 72 6d 20 22 |pply mak|e-term "|
|00002490| 73 68 65 6c 6c 22 20 66 | 69 6c 65 2d 65 78 69 73 |shell" f|ile-exis|
|000024a0| 74 73 2d 70 20 62 6f 75 | 6e 64 70 20 28 22 2d 69 |ts-p bou|ndp ("-i|
|000024b0| 22 29 20 74 73 68 65 6c | 6c 2d 6d 6f 64 65 20 73 |") tshel|l-mode s|
|000024c0| 77 69 74 63 68 2d 74 6f | 2d 62 75 66 66 65 72 5d |witch-to|-buffer]|
|000024d0| 20 37 20 28 23 24 20 2e | 20 38 30 32 31 29 20 6e | 7 (#$ .| 8021) n|
|000024e0| 69 6c 5d 29 0a 23 40 36 | 34 31 20 54 72 61 63 6b |il]).#@6|41 Track|
|000024f0| 73 20 63 64 2c 20 70 75 | 73 68 64 20 61 6e 64 20 |s cd, pu|shd and |
|00002500| 70 6f 70 64 20 63 6f 6d | 6d 61 6e 64 73 20 69 73 |popd com|mands is|
|00002510| 73 75 65 64 20 74 6f 20 | 74 68 65 20 73 68 65 6c |sued to |the shel|
|00002520| 6c 2e 0a 54 68 69 73 20 | 66 75 6e 63 74 69 6f 6e |l..This |function|
|00002530| 20 69 73 20 63 61 6c 6c | 65 64 20 6f 6e 20 65 61 | is call|ed on ea|
|00002540| 63 68 20 69 6e 70 75 74 | 20 70 61 73 73 65 64 20 |ch input| passed |
|00002550| 74 6f 20 74 68 65 20 73 | 68 65 6c 6c 2e 0a 49 74 |to the s|hell..It|
|00002560| 20 77 61 74 63 68 65 73 | 20 66 6f 72 20 63 64 2c | watches| for cd,|
|00002570| 20 70 75 73 68 64 20 61 | 6e 64 20 70 6f 70 64 20 | pushd a|nd popd |
|00002580| 63 6f 6d 6d 61 6e 64 73 | 20 61 6e 64 20 73 65 74 |commands| and set|
|00002590| 73 20 74 68 65 20 62 75 | 66 66 65 72 27 73 0a 64 |s the bu|ffer's.d|
|000025a0| 65 66 61 75 6c 74 20 64 | 69 72 65 63 74 6f 72 79 |efault d|irectory|
|000025b0| 20 74 6f 20 74 72 61 63 | 6b 20 74 68 65 73 65 20 | to trac|k these |
|000025c0| 63 6f 6d 6d 61 6e 64 73 | 2e 0a 0a 59 6f 75 20 6d |commands|...You m|
|000025d0| 61 79 20 74 6f 67 67 6c | 65 20 74 68 69 73 20 74 |ay toggl|e this t|
|000025e0| 72 61 63 6b 69 6e 67 20 | 6f 6e 20 61 6e 64 20 6f |racking |on and o|
|000025f0| 66 66 20 77 69 74 68 20 | 4d 2d 78 20 64 69 72 74 |ff with |M-x dirt|
|00002600| 72 61 63 6b 2d 74 6f 67 | 67 6c 65 2e 0a 49 66 20 |rack-tog|gle..If |
|00002610| 65 6d 61 63 73 20 67 65 | 74 73 20 63 6f 6e 66 75 |emacs ge|ts confu|
|00002620| 73 65 64 2c 20 79 6f 75 | 20 63 61 6e 20 72 65 73 |sed, you| can res|
|00002630| 79 6e 63 20 77 69 74 68 | 20 74 68 65 20 73 68 65 |ync with| the she|
|00002640| 6c 6c 20 77 69 74 68 20 | 4d 2d 78 20 64 69 72 73 |ll with |M-x dirs|
|00002650| 2e 0a 0a 53 65 65 20 76 | 61 72 69 61 62 6c 65 73 |...See v|ariables|
|00002660| 20 60 73 68 65 6c 6c 2d | 63 64 2d 72 65 67 65 78 | `shell-|cd-regex|
|00002670| 70 27 2c 20 60 73 68 65 | 6c 6c 2d 70 75 73 68 64 |p', `she|ll-pushd|
|00002680| 2d 72 65 67 65 78 70 27 | 2c 20 61 6e 64 20 60 73 |-regexp'|, and `s|
|00002690| 68 65 6c 6c 2d 70 6f 70 | 64 2d 72 65 67 65 78 70 |hell-pop|d-regexp|
|000026a0| 27 2c 0a 77 68 69 6c 65 | 20 60 73 68 65 6c 6c 2d |',.while| `shell-|
|000026b0| 70 75 73 68 64 2d 74 6f | 68 6f 6d 65 27 2c 20 60 |pushd-to|home', `|
|000026c0| 73 68 65 6c 6c 2d 70 75 | 73 68 64 2d 64 65 78 74 |shell-pu|shd-dext|
|000026d0| 72 61 63 74 27 20 61 6e | 64 20 60 73 68 65 6c 6c |ract' an|d `shell|
|000026e0| 2d 70 75 73 68 64 2d 64 | 75 6e 69 71 75 65 27 0a |-pushd-d|unique'.|
|000026f0| 63 6f 6e 74 72 6f 6c 20 | 74 68 65 20 62 65 68 61 |control |the beha|
|00002700| 76 69 6f 72 20 6f 66 20 | 74 68 65 20 72 65 6c 65 |vior of |the rele|
|00002710| 76 61 6e 74 20 63 6f 6d | 6d 61 6e 64 2e 0a 0a 45 |vant com|mand...E|
|00002720| 6e 76 69 72 6f 6e 6d 65 | 6e 74 20 76 61 72 69 61 |nvironme|nt varia|
|00002730| 62 6c 65 73 20 61 72 65 | 20 65 78 70 61 6e 64 65 |bles are| expande|
|00002740| 64 2c 20 73 65 65 20 66 | 75 6e 63 74 69 6f 6e 20 |d, see f|unction |
|00002750| 60 73 75 62 73 74 69 74 | 75 74 65 2d 69 6e 2d 66 |`substit|ute-in-f|
|00002760| 69 6c 65 2d 6e 61 6d 65 | 27 2e 1f 0a 28 64 65 66 |ile-name|'...(def|
|00002770| 61 6c 69 61 73 20 27 74 | 73 68 65 6c 6c 2d 64 69 |alias 't|shell-di|
|00002780| 72 65 63 74 6f 72 79 2d | 74 72 61 63 6b 65 72 20 |rectory-|tracker |
|00002790| 23 5b 28 73 74 72 29 20 | 22 08 ad 84 c1 c2 c3 8f |#[(str) |".......|
|000027a0| 87 22 20 5b 74 73 68 65 | 6c 6c 2d 64 69 72 74 72 |." [tshe|ll-dirtr|
|000027b0| 61 63 6b 70 20 63 68 64 | 69 72 2d 66 61 69 6c 75 |ackp chd|ir-failu|
|000027c0| 72 65 20 28 62 79 74 65 | 2d 63 6f 64 65 20 22 c0 |re (byte|-code ".|
|000027d0| c1 5c 6e 5c 22 88 c3 95 | c4 89 89 1d 1e 06 1e 07 |.\n\"...|........|
|000027e0| 1e 08 c0 0e 09 5c 6e 0e | 08 23 ad dc c3 95 16 07 |.....\n.|.#......|
|000027f0| ca 5c 6e 0e 08 0e 07 4f | c3 89 23 16 06 ca 5c 6e |.\n....O|..#...\n|
|00002800| 0e 08 0e 07 4f cb 89 23 | 15 c0 0e 0c 0e 06 5c 22 |....O..#|......\"|
|00002810| c3 61 ab 88 cd ce 0d 21 | 21 88 aa a2 c0 0e 0f 0e |.a.....!|!.......|
|00002820| 06 5c 22 c3 61 ab 88 d0 | ce 0d 21 21 88 aa 90 c0 |.\".a...|..!!....|
|00002830| 0e 11 0e 06 5c 22 c3 61 | ab 86 d2 ce 0d 21 21 88 |....\".a|.....!!.|
|00002840| c0 d3 5c 6e 0e 07 23 88 | c3 95 16 08 aa 1b 2c 87 |..\n..#.|......,.|
|00002850| 22 20 5b 73 74 72 69 6e | 67 2d 6d 61 74 63 68 20 |" [strin|g-match |
|00002860| 22 5e 5b 3b 5c 5c 73 20 | 5d 2a 22 20 73 74 72 20 |"^[;\\s |]*" str |
|00002870| 30 20 6e 69 6c 20 61 72 | 67 31 20 63 6d 64 20 65 |0 nil ar|g1 cmd e|
|00002880| 6e 64 20 73 74 61 72 74 | 20 73 68 65 6c 6c 2d 63 |nd start| shell-c|
|00002890| 6f 6d 6d 61 6e 64 2d 72 | 65 67 65 78 70 20 74 65 |ommand-r|egexp te|
|000028a0| 72 6d 2d 61 72 67 75 6d | 65 6e 74 73 20 31 20 73 |rm-argum|ents 1 s|
|000028b0| 68 65 6c 6c 2d 70 6f 70 | 64 2d 72 65 67 65 78 70 |hell-pop|d-regexp|
|000028c0| 20 74 73 68 65 6c 6c 2d | 70 72 6f 63 65 73 73 2d | tshell-|process-|
|000028d0| 70 6f 70 64 20 73 75 62 | 73 74 69 74 75 74 65 2d |popd sub|stitute-|
|000028e0| 69 6e 2d 66 69 6c 65 2d | 6e 61 6d 65 20 73 68 65 |in-file-|name she|
|000028f0| 6c 6c 2d 70 75 73 68 64 | 2d 72 65 67 65 78 70 20 |ll-pushd|-regexp |
|00002900| 74 73 68 65 6c 6c 2d 70 | 72 6f 63 65 73 73 2d 70 |tshell-p|rocess-p|
|00002910| 75 73 68 64 20 73 68 65 | 6c 6c 2d 63 64 2d 72 65 |ushd she|ll-cd-re|
|00002920| 67 65 78 70 20 74 73 68 | 65 6c 6c 2d 70 72 6f 63 |gexp tsh|ell-proc|
|00002930| 65 73 73 2d 63 64 20 22 | 5b 3b 5c 5c 73 20 5d 2a |ess-cd "|[;\\s ]*|
|00002940| 22 5d 20 34 29 20 28 28 | 65 72 72 6f 72 20 22 43 |"] 4) ((|error "C|
|00002950| 6f 75 6c 64 6e 27 74 20 | 63 64 22 29 29 5d 20 33 |ouldn't |cd"))] 3|
|00002960| 20 28 23 24 20 2e 20 39 | 34 35 31 29 5d 29 0a 28 | (#$ . 9|451)]).(|
|00002970| 64 65 66 61 6c 69 61 73 | 20 27 74 73 68 65 6c 6c |defalias| 'tshell|
|00002980| 2d 70 72 6f 63 65 73 73 | 2d 70 6f 70 64 20 23 5b |-process|-popd #[|
|00002990| 28 61 72 67 29 20 22 c0 | 09 21 ae 81 c2 89 1b ab |(arg) ".|.!......|
|000029a0| 94 0b c2 55 ab 8f 0c ab | 8c c5 0c 40 21 88 0c 41 |...U....|...@!..A|
|000029b0| 14 c6 20 aa ac 0b ab a6 | 0b c2 56 ab a1 0b 0c 47 |.. .....|..V....G|
|000029c0| 58 ab 9b c7 0c 42 1e 08 | 0b 53 0e 08 9b 89 1e 09 |X....B..|.S......|
|000029d0| 89 41 41 a1 88 0e 08 41 | 14 c6 20 2a aa 83 ca cb |.AA....A|.. *....|
|000029e0| 21 29 87 22 20 5b 74 73 | 68 65 6c 6c 2d 65 78 74 |!)." [ts|hell-ext|
|000029f0| 72 61 63 74 2d 6e 75 6d | 20 61 72 67 20 30 20 6e |ract-num| arg 0 n|
|00002a00| 75 6d 20 74 73 68 65 6c | 6c 2d 64 69 72 73 74 61 |um tshel|l-dirsta|
|00002a10| 63 6b 20 63 64 20 74 73 | 68 65 6c 6c 2d 64 69 72 |ck cd ts|hell-dir|
|00002a20| 73 74 61 63 6b 2d 6d 65 | 73 73 61 67 65 20 6e 69 |stack-me|ssage ni|
|00002a30| 6c 20 64 73 20 63 65 6c | 6c 20 65 72 72 6f 72 20 |l ds cel|l error |
|00002a40| 22 43 6f 75 6c 64 6e 27 | 74 20 70 6f 70 64 22 5d |"Couldn'|t popd"]|
|00002a50| 20 33 5d 29 0a 28 64 65 | 66 61 6c 69 61 73 20 27 | 3]).(de|falias '|
|00002a60| 74 73 68 65 6c 6c 2d 70 | 72 65 66 69 78 65 64 2d |tshell-p|refixed-|
|00002a70| 64 69 72 65 63 74 6f 72 | 79 2d 6e 61 6d 65 20 23 |director|y-name #|
|00002a80| 5b 28 64 69 72 29 20 22 | 08 47 c1 55 ab 82 5c 6e |[(dir) "|.G.U..\n|
|00002a90| 87 c3 5c 6e 21 ab 84 08 | 5c 6e 50 87 c4 5c 6e 21 |..\n!...|\nP..\n!|
|00002aa0| 87 22 20 5b 74 65 72 6d | 2d 66 69 6c 65 2d 6e 61 |." [term|-file-na|
|00002ab0| 6d 65 2d 70 72 65 66 69 | 78 20 30 20 64 69 72 20 |me-prefi|x 0 dir |
|00002ac0| 66 69 6c 65 2d 6e 61 6d | 65 2d 61 62 73 6f 6c 75 |file-nam|e-absolu|
|00002ad0| 74 65 2d 70 20 65 78 70 | 61 6e 64 2d 66 69 6c 65 |te-p exp|and-file|
|00002ae0| 2d 6e 61 6d 65 5d 20 32 | 5d 29 0a 28 64 65 66 61 |-name] 2|]).(defa|
|00002af0| 6c 69 61 73 20 27 74 73 | 68 65 6c 6c 2d 70 72 6f |lias 'ts|hell-pro|
|00002b00| 63 65 73 73 2d 63 64 20 | 23 5b 28 61 72 67 29 20 |cess-cd |#[(arg) |
|00002b10| 22 08 47 c1 55 ab 85 5c | 6e c3 50 aa 8b 08 c4 98 |".G.U..\|n.P.....|
|00002b20| ab 83 0d aa 83 c6 08 21 | 1e 07 0e 08 15 c9 0e 07 |.......!|........|
|00002b30| 21 88 ca 20 29 87 22 20 | 5b 61 72 67 20 30 20 74 |!.. )." |[arg 0 t|
|00002b40| 65 72 6d 2d 66 69 6c 65 | 2d 6e 61 6d 65 2d 70 72 |erm-file|-name-pr|
|00002b50| 65 66 69 78 20 22 7e 22 | 20 22 2d 22 20 74 73 68 |efix "~"| "-" tsh|
|00002b60| 65 6c 6c 2d 6c 61 73 74 | 2d 64 69 72 20 74 73 68 |ell-last|-dir tsh|
|00002b70| 65 6c 6c 2d 70 72 65 66 | 69 78 65 64 2d 64 69 72 |ell-pref|ixed-dir|
|00002b80| 65 63 74 6f 72 79 2d 6e | 61 6d 65 20 6e 65 77 2d |ectory-n|ame new-|
|00002b90| 64 69 72 20 64 65 66 61 | 75 6c 74 2d 64 69 72 65 |dir defa|ult-dire|
|00002ba0| 63 74 6f 72 79 20 63 64 | 20 74 73 68 65 6c 6c 2d |ctory cd| tshell-|
|00002bb0| 64 69 72 73 74 61 63 6b | 2d 6d 65 73 73 61 67 65 |dirstack|-message|
|00002bc0| 5d 20 32 5d 29 0a 28 64 | 65 66 61 6c 69 61 73 20 |] 2]).(d|efalias |
|00002bd0| 27 74 73 68 65 6c 6c 2d | 70 72 6f 63 65 73 73 2d |'tshell-|process-|
|00002be0| 70 75 73 68 64 20 23 5b | 28 61 72 67 29 20 22 c0 |pushd #[|(arg) ".|
|00002bf0| 09 21 1a 09 47 c3 55 ab | ae 0c ab 89 c5 0e 06 c7 |.!..G.U.|........|
|00002c00| 50 21 82 c7 00 0e 08 ab | 98 0e 09 1e 5c 6e cb 0e |P!......|....\n..|
|00002c10| 08 40 21 88 0e 5c 6e 0e | 08 41 42 16 08 cc 20 29 |.@!..\n.|.AB... )|
|00002c20| 82 c7 00 cd ce 21 82 c7 | 00 5c 6e a7 ab ec 5c 6e |.....!..|.\n...\n|
|00002c30| 0e 08 47 56 ab 85 cd cf | 21 aa ff 5c 6e c3 55 ab |..GV....|!..\n.U.|
|00002c40| 87 d0 cd d1 21 21 aa f3 | 0e 12 ab 9a 5c 6e 53 0e |....!!..|....\nS.|
|00002c50| 08 38 1e 13 d4 09 21 88 | d5 0e 09 21 88 cb 0e 13 |.8....!.|...!....|
|00002c60| 21 88 cc 20 29 aa d5 0e | 09 0e 08 42 89 1e 16 47 |!.. )...|...B...G|
|00002c70| 1e 17 5c 6e 0e 16 9b 1e | 18 d9 0e 17 5c 6e 5a d9 |..\n....|....\nZ.|
|00002c80| 0e 16 21 9b 21 1e 1a db | 0e 18 0e 1a 5c 22 1e 1c |..!.!...|....\"..|
|00002c90| cb 0e 1c 40 21 88 0e 1c | 41 16 08 cc 20 2d aa 9f |...@!...|A... -..|
|00002ca0| 0e 09 1e 1d cb de 09 21 | 21 88 0e 1f ab 87 0e 1d |.......!|!.......|
|00002cb0| 0e 08 b6 ac 87 0e 1d 0e | 08 42 16 08 cc 20 29 29 |........|.B... ))|
|00002cc0| 87 22 20 5b 74 73 68 65 | 6c 6c 2d 65 78 74 72 61 |." [tshe|ll-extra|
|00002cd0| 63 74 2d 6e 75 6d 20 61 | 72 67 20 6e 75 6d 20 30 |ct-num a|rg num 0|
|00002ce0| 20 73 68 65 6c 6c 2d 70 | 75 73 68 64 2d 74 6f 68 | shell-p|ushd-toh|
|00002cf0| 6f 6d 65 20 73 68 65 6c | 6c 2d 70 72 6f 63 65 73 |ome shel|l-proces|
|00002d00| 73 2d 70 75 73 68 64 20 | 74 65 72 6d 2d 66 69 6c |s-pushd |term-fil|
|00002d10| 65 2d 6e 61 6d 65 2d 70 | 72 65 66 69 78 20 22 7e |e-name-p|refix "~|
|00002d20| 22 20 74 73 68 65 6c 6c | 2d 64 69 72 73 74 61 63 |" tshell|-dirstac|
|00002d30| 6b 20 64 65 66 61 75 6c | 74 2d 64 69 72 65 63 74 |k defaul|t-direct|
|00002d40| 6f 72 79 20 6f 6c 64 20 | 63 64 20 74 73 68 65 6c |ory old |cd tshel|
|00002d50| 6c 2d 64 69 72 73 74 61 | 63 6b 2d 6d 65 73 73 61 |l-dirsta|ck-messa|
|00002d60| 67 65 20 6d 65 73 73 61 | 67 65 20 22 44 69 72 65 |ge messa|ge "Dire|
|00002d70| 63 74 6f 72 79 20 73 74 | 61 63 6b 20 65 6d 70 74 |ctory st|ack empt|
|00002d80| 79 2e 22 20 22 44 69 72 | 65 63 74 6f 72 79 20 73 |y." "Dir|ectory s|
|00002d90| 74 61 63 6b 20 6e 6f 74 | 20 74 68 61 74 20 64 65 |tack not| that de|
|00002da0| 65 70 2e 22 20 65 72 72 | 6f 72 20 22 43 6f 75 6c |ep." err|or "Coul|
|00002db0| 64 6e 27 74 20 63 64 2e | 22 20 73 68 65 6c 6c 2d |dn't cd.|" shell-|
|00002dc0| 70 75 73 68 64 2d 64 65 | 78 74 72 61 63 74 20 64 |pushd-de|xtract d|
|00002dd0| 69 72 20 74 73 68 65 6c | 6c 2d 70 72 6f 63 65 73 |ir tshel|l-proces|
|00002de0| 73 2d 70 6f 70 64 20 74 | 73 68 65 6c 6c 2d 70 72 |s-popd t|shell-pr|
|00002df0| 6f 63 65 73 73 2d 70 75 | 73 68 64 20 64 73 20 64 |ocess-pu|shd ds d|
|00002e00| 73 6c 65 6e 20 66 72 6f | 6e 74 20 72 65 76 65 72 |slen fro|nt rever|
|00002e10| 73 65 20 62 61 63 6b 20 | 61 70 70 65 6e 64 20 6e |se back |append n|
|00002e20| 65 77 2d 64 73 20 6f 6c | 64 2d 77 64 20 74 73 68 |ew-ds ol|d-wd tsh|
|00002e30| 65 6c 6c 2d 70 72 65 66 | 69 78 65 64 2d 64 69 72 |ell-pref|ixed-dir|
|00002e40| 65 63 74 6f 72 79 2d 6e | 61 6d 65 20 73 68 65 6c |ectory-n|ame shel|
|00002e50| 6c 2d 70 75 73 68 64 2d | 64 75 6e 69 71 75 65 5d |l-pushd-|dunique]|
|00002e60| 20 35 5d 29 0a 28 64 65 | 66 61 6c 69 61 73 20 27 | 5]).(de|falias '|
|00002e70| 74 73 68 65 6c 6c 2d 65 | 78 74 72 61 63 74 2d 6e |tshell-e|xtract-n|
|00002e80| 75 6d 20 23 5b 28 73 74 | 72 29 20 22 c0 c1 5c 6e |um #[(st|r) "..\n|
|00002e90| 5c 22 ad 83 c3 5c 6e 21 | 87 22 20 5b 73 74 72 69 |\"...\n!|." [stri|
|00002ea0| 6e 67 2d 6d 61 74 63 68 | 20 22 5e 5c 5c 2b 5b 31 |ng-match| "^\\+[1|
|00002eb0| 2d 39 5d 5b 30 2d 39 5d | 2a 24 22 20 73 74 72 20 |-9][0-9]|*$" str |
|00002ec0| 73 74 72 69 6e 67 2d 74 | 6f 2d 69 6e 74 5d 20 33 |string-t|o-int] 3|
|00002ed0| 5d 29 0a 23 40 35 35 20 | 54 75 72 6e 20 64 69 72 |]).#@55 |Turn dir|
|00002ee0| 65 63 74 6f 72 79 20 74 | 72 61 63 6b 69 6e 67 20 |ectory t|racking |
|00002ef0| 6f 6e 20 61 6e 64 20 6f | 66 66 20 69 6e 20 61 20 |on and o|ff in a |
|00002f00| 73 68 65 6c 6c 20 62 75 | 66 66 65 72 2e 1f 0a 28 |shell bu|ffer...(|
|00002f10| 64 65 66 61 6c 69 61 73 | 20 27 74 73 68 65 6c 6c |defalias| 'tshell|
|00002f20| 2d 64 69 72 74 72 61 63 | 6b 2d 74 6f 67 67 6c 65 |-dirtrac|k-toggle|
|00002f30| 20 23 5b 6e 69 6c 20 22 | 08 3f 10 c1 c2 08 ab 83 | #[nil "|.?......|
|00002f40| c3 aa 81 c4 5c 22 87 22 | 20 5b 74 73 68 65 6c 6c |....\"."| [tshell|
|00002f50| 2d 64 69 72 74 72 61 63 | 6b 70 20 6d 65 73 73 61 |-dirtrac|kp messa|
|00002f60| 67 65 20 22 44 69 72 65 | 63 74 6f 72 79 20 74 72 |ge "Dire|ctory tr|
|00002f70| 61 63 6b 69 6e 67 20 25 | 73 22 20 22 4f 4e 22 20 |acking %|s" "ON" |
|00002f80| 22 4f 46 46 22 5d 20 33 | 20 28 23 24 20 2e 20 31 |"OFF"] 3| (#$ . 1|
|00002f90| 31 39 39 32 29 20 6e 69 | 6c 5d 29 0a 28 64 65 66 |1992) ni|l]).(def|
|00002fa0| 61 6c 69 61 73 20 27 64 | 69 72 74 72 61 63 6b 2d |alias 'd|irtrack-|
|00002fb0| 74 6f 67 67 6c 65 20 27 | 74 73 68 65 6c 6c 2d 64 |toggle '|tshell-d|
|00002fc0| 69 72 74 72 61 63 6b 2d | 74 6f 67 67 6c 65 29 0a |irtrack-|toggle).|
|00002fd0| 23 40 34 39 37 20 52 65 | 73 79 6e 63 20 74 68 65 |#@497 Re|sync the|
|00002fe0| 20 62 75 66 66 65 72 27 | 73 20 69 64 65 61 20 6f | buffer'|s idea o|
|00002ff0| 66 20 74 68 65 20 63 75 | 72 72 65 6e 74 20 64 69 |f the cu|rrent di|
|00003000| 72 65 63 74 6f 72 79 20 | 73 74 61 63 6b 2e 0a 54 |rectory |stack..T|
|00003010| 68 69 73 20 63 6f 6d 6d | 61 6e 64 20 71 75 65 72 |his comm|and quer|
|00003020| 69 65 73 20 74 68 65 20 | 73 68 65 6c 6c 20 77 69 |ies the |shell wi|
|00003030| 74 68 20 74 68 65 20 63 | 6f 6d 6d 61 6e 64 20 62 |th the c|ommand b|
|00003040| 6f 75 6e 64 20 74 6f 20 | 0a 60 74 73 68 65 6c 6c |ound to |.`tshell|
|00003050| 2d 64 69 72 73 74 61 63 | 6b 2d 71 75 65 72 79 27 |-dirstac|k-query'|
|00003060| 20 28 64 65 66 61 75 6c | 74 20 22 64 69 72 73 22 | (defaul|t "dirs"|
|00003070| 29 2c 20 72 65 61 64 73 | 20 74 68 65 20 6e 65 78 |), reads| the nex|
|00003080| 74 0a 6c 69 6e 65 20 6f | 75 74 70 75 74 20 61 6e |t.line o|utput an|
|00003090| 64 20 70 61 72 73 65 73 | 20 69 74 20 74 6f 20 66 |d parses| it to f|
|000030a0| 6f 72 6d 20 74 68 65 20 | 6e 65 77 20 64 69 72 65 |orm the |new dire|
|000030b0| 63 74 6f 72 79 20 73 74 | 61 63 6b 2e 0a 44 4f 4e |ctory st|ack..DON|
|000030c0| 27 54 20 69 73 73 75 65 | 20 74 68 69 73 20 63 6f |'T issue| this co|
|000030d0| 6d 6d 61 6e 64 20 75 6e | 6c 65 73 73 20 74 68 65 |mmand un|less the|
|000030e0| 20 62 75 66 66 65 72 20 | 69 73 20 61 74 20 61 20 | buffer |is at a |
|000030f0| 73 68 65 6c 6c 20 70 72 | 6f 6d 70 74 2e 0a 41 6c |shell pr|ompt..Al|
|00003100| 73 6f 2c 20 6e 6f 74 65 | 20 74 68 61 74 20 69 66 |so, note| that if|
|00003110| 20 73 6f 6d 65 20 6f 74 | 68 65 72 20 73 75 62 70 | some ot|her subp|
|00003120| 72 6f 63 65 73 73 20 64 | 65 63 69 64 65 73 20 74 |rocess d|ecides t|
|00003130| 6f 20 64 6f 20 6f 75 74 | 70 75 74 0a 69 6d 6d 65 |o do out|put.imme|
|00003140| 64 69 61 74 65 6c 79 20 | 61 66 74 65 72 20 74 68 |diately |after th|
|00003150| 65 20 71 75 65 72 79 2c | 20 69 74 73 20 6f 75 74 |e query,| its out|
|00003160| 70 75 74 20 77 69 6c 6c | 20 62 65 20 74 61 6b 65 |put will| be take|
|00003170| 6e 20 61 73 20 74 68 65 | 0a 6e 65 77 20 64 69 72 |n as the|.new dir|
|00003180| 65 63 74 6f 72 79 20 73 | 74 61 63 6b 20 2d 2d 20 |ectory s|tack -- |
|00003190| 79 6f 75 20 6c 6f 73 65 | 2e 20 49 66 20 74 68 69 |you lose|. If thi|
|000031a0| 73 20 68 61 70 70 65 6e | 73 2c 20 6a 75 73 74 20 |s happen|s, just |
|000031b0| 64 6f 20 74 68 65 0a 63 | 6f 6d 6d 61 6e 64 20 61 |do the.c|ommand a|
|000031c0| 67 61 69 6e 2e 1f 0a 28 | 64 65 66 61 6c 69 61 73 |gain...(|defalias|
|000031d0| 20 27 74 73 68 65 6c 6c | 2d 72 65 73 79 6e 63 2d | 'tshell|-resync-|
|000031e0| 64 69 72 73 20 23 5b 6e | 69 6c 20 22 c0 70 21 19 |dirs #[n|il ".p!.|
|000031f0| c2 09 21 89 1b 62 88 0c | 63 88 c5 63 88 c6 c7 21 |..!..b..|c..c...!|
|00003200| 88 c8 09 0c 5c 22 88 c8 | 09 c5 5c 22 88 0b 60 c9 |....\"..|..\"..`.|
|00003210| 93 88 60 1e 5c 6e c5 63 | 88 cb cc 21 88 cd ce 21 |..`.\n.c|...!...!|
|00003220| ac 8a cf 09 21 88 0e 5c | 6e 62 88 aa 71 29 0b 62 |....!..\|nb..q).b|
|00003230| 88 d0 cc 21 88 c7 94 c7 | 95 53 7b 89 1e 11 47 1e |...!....|.S{...G.|
|00003240| 12 c9 1e 13 c7 1e 14 c7 | 0e 12 57 ab 9e d5 d6 0e |........|..W.....|
|00003250| 11 0e 14 23 88 0e 17 0e | 11 cc 94 cc 95 4f 50 0e |...#....|.....OP.|
|00003260| 13 42 16 13 c7 95 89 16 | 14 aa 5d 0e 13 9f 1e 13 |.B......|..].....|
|00003270| c9 d8 d9 8f 2e 07 87 22 | 20 5b 67 65 74 2d 62 75 |......."| [get-bu|
|00003280| 66 66 65 72 2d 70 72 6f | 63 65 73 73 20 70 72 6f |ffer-pro|cess pro|
|00003290| 63 20 70 72 6f 63 65 73 | 73 2d 6d 61 72 6b 20 70 |c proces|s-mark p|
|000032a0| 6d 61 72 6b 20 74 73 68 | 65 6c 6c 2d 64 69 72 73 |mark tsh|ell-dirs|
|000032b0| 74 61 63 6b 2d 71 75 65 | 72 79 20 22 5c 6e 22 20 |tack-que|ry "\n" |
|000032c0| 73 69 74 2d 66 6f 72 20 | 30 20 74 65 72 6d 2d 73 |sit-for |0 term-s|
|000032d0| 65 6e 64 2d 73 74 72 69 | 6e 67 20 6e 69 6c 20 70 |end-stri|ng nil p|
|000032e0| 74 20 62 61 63 6b 77 61 | 72 64 2d 63 68 61 72 20 |t backwa|rd-char |
|000032f0| 31 20 6c 6f 6f 6b 69 6e | 67 2d 61 74 20 22 2e 2b |1 lookin|g-at ".+|
|00003300| 5c 6e 22 20 61 63 63 65 | 70 74 2d 70 72 6f 63 65 |\n" acce|pt-proce|
|00003310| 73 73 2d 6f 75 74 70 75 | 74 20 64 65 6c 65 74 65 |ss-outpu|t delete|
|00003320| 2d 63 68 61 72 20 64 6c | 20 64 6c 2d 6c 65 6e 20 |-char dl| dl-len |
|00003330| 64 73 20 69 20 73 74 72 | 69 6e 67 2d 6d 61 74 63 |ds i str|ing-matc|
|00003340| 68 20 22 5c 5c 73 20 2a | 5c 5c 28 5c 5c 53 20 2b |h "\\s *|\\(\\S +|
|00003350| 5c 5c 29 5c 5c 73 20 2a | 22 20 74 65 72 6d 2d 66 |\\)\\s *|" term-f|
|00003360| 69 6c 65 2d 6e 61 6d 65 | 2d 70 72 65 66 69 78 20 |ile-name|-prefix |
|00003370| 28 62 79 74 65 2d 63 6f | 64 65 20 22 c0 09 40 21 |(byte-co|de "..@!|
|00003380| 88 09 41 12 c3 20 87 22 | 20 5b 63 64 20 64 73 20 |..A.. ."| [cd ds |
|00003390| 74 73 68 65 6c 6c 2d 64 | 69 72 73 74 61 63 6b 20 |tshell-d|irstack |
|000033a0| 74 73 68 65 6c 6c 2d 64 | 69 72 73 74 61 63 6b 2d |tshell-d|irstack-|
|000033b0| 6d 65 73 73 61 67 65 5d | 20 32 29 20 28 28 65 72 |message]| 2) ((er|
|000033c0| 72 6f 72 20 28 6d 65 73 | 73 61 67 65 20 22 43 6f |ror (mes|sage "Co|
|000033d0| 75 6c 64 6e 27 74 20 63 | 64 2e 22 29 29 29 5d 20 |uldn't c|d.")))] |
|000033e0| 35 20 28 23 24 20 2e 20 | 31 32 32 34 36 29 20 6e |5 (#$ . |12246) n|
|000033f0| 69 6c 5d 29 0a 28 64 65 | 66 61 6c 69 61 73 20 27 |il]).(de|falias '|
|00003400| 64 69 72 73 20 27 74 73 | 68 65 6c 6c 2d 72 65 73 |dirs 'ts|hell-res|
|00003410| 79 6e 63 2d 64 69 72 73 | 29 0a 28 64 65 66 61 6c |ync-dirs|).(defal|
|00003420| 69 61 73 20 27 74 73 68 | 65 6c 6c 2d 64 69 72 73 |ias 'tsh|ell-dirs|
|00003430| 74 61 63 6b 2d 6d 65 73 | 73 61 67 65 20 23 5b 6e |tack-mes|sage #[n|
|00003440| 69 6c 20 22 c0 19 5c 6e | 0b 42 1c c5 0e 06 c7 50 |il "..\n|.B.....P|
|00003450| 21 89 1e 08 47 1e 09 0c | ab d8 0c 40 89 1e 5c 6e |!...G...|...@..\n|
|00003460| 47 0e 09 59 ab 95 0e 08 | 0e 5c 6e cb 0e 09 4f 98 |G..Y....|.\n...O.|
|00003470| ab 8a c7 0e 5c 6e 0e 09 | cc 4f 50 16 5c 6e 0e 06 |....\n..|.OP.\n..|
|00003480| ab a6 0e 5c 6e 47 0e 06 | 47 59 ab 9d 0e 06 0e 5c |...\nG..|GY.....\|
|00003490| 6e cb 0e 06 47 4f 98 ab | 91 0e 5c 6e 0e 06 47 cc |n...GO..|..\n..G.|
|000034a0| 4f 89 16 5c 6e ab 85 0c | 0e 5c 6e a0 88 09 cd 0e |O..\n...|.\n.....|
|000034b0| 5c 6e 21 ce 51 11 0c 41 | 14 29 aa 25 cf 09 21 2c |\n!.Q..A|.).%..!,|
|000034c0| 87 22 20 5b 22 22 20 6d | 73 67 20 64 65 66 61 75 |." ["" m|sg defau|
|000034d0| 6c 74 2d 64 69 72 65 63 | 74 6f 72 79 20 74 73 68 |lt-direc|tory tsh|
|000034e0| 65 6c 6c 2d 64 69 72 73 | 74 61 63 6b 20 64 73 20 |ell-dirs|tack ds |
|000034f0| 65 78 70 61 6e 64 2d 66 | 69 6c 65 2d 6e 61 6d 65 |expand-f|ile-name|
|00003500| 20 74 65 72 6d 2d 66 69 | 6c 65 2d 6e 61 6d 65 2d | term-fi|le-name-|
|00003510| 70 72 65 66 69 78 20 22 | 7e 2f 22 20 68 6f 6d 65 |prefix "|~/" home|
|00003520| 20 68 6f 6d 65 6c 65 6e | 20 64 69 72 20 30 20 6e | homelen| dir 0 n|
|00003530| 69 6c 20 64 69 72 65 63 | 74 6f 72 79 2d 66 69 6c |il direc|tory-fil|
|00003540| 65 2d 6e 61 6d 65 20 22 | 20 22 20 6d 65 73 73 61 |e-name "| " messa|
|00003550| 67 65 5d 20 35 5d 29 0a | 23 40 39 34 20 4d 6f 76 |ge] 5]).|#@94 Mov|
|00003560| 65 20 66 6f 72 77 61 72 | 64 20 61 63 72 6f 73 73 |e forwar|d across|
|00003570| 20 41 52 47 20 73 68 65 | 6c 6c 20 63 6f 6d 6d 61 | ARG she|ll comma|
|00003580| 6e 64 28 73 29 2e 20 20 | 44 6f 65 73 20 6e 6f 74 |nd(s). |Does not|
|00003590| 20 63 72 6f 73 73 20 6c | 69 6e 65 73 2e 0a 53 65 | cross l|ines..Se|
|000035a0| 65 20 60 73 68 65 6c 6c | 2d 63 6f 6d 6d 61 6e 64 |e `shell|-command|
|000035b0| 2d 72 65 67 65 78 70 27 | 2e 1f 0a 28 64 65 66 61 |-regexp'|...(defa|
|000035c0| 6c 69 61 73 20 27 74 73 | 68 65 6c 6c 2d 66 6f 72 |lias 'ts|hell-for|
|000035d0| 77 61 72 64 2d 63 6f 6d | 6d 61 6e 64 20 23 5b 28 |ward-com|mand #[(|
|000035e0| 26 6f 70 74 69 6f 6e 61 | 6c 20 61 72 67 29 20 22 |&optiona|l arg) "|
|000035f0| 8a c0 7f 88 60 29 19 c2 | 0b c4 50 09 c5 0e 06 24 |....`)..|..P....$|
|00003600| ad 83 c7 c8 21 29 87 22 | 20 5b 6e 69 6c 20 6c 69 |....!)."| [nil li|
|00003610| 6d 69 74 20 72 65 2d 73 | 65 61 72 63 68 2d 66 6f |mit re-s|earch-fo|
|00003620| 72 77 61 72 64 20 73 68 | 65 6c 6c 2d 63 6f 6d 6d |rward sh|ell-comm|
|00003630| 61 6e 64 2d 72 65 67 65 | 78 70 20 22 5c 5c 28 5b |and-rege|xp "\\([|
|00003640| 3b 26 7c 5d 5b 09 20 5d | 2a 5c 5c 29 2b 22 20 6d |;&|][. ]|*\\)+" m|
|00003650| 6f 76 65 20 61 72 67 20 | 73 6b 69 70 2d 73 79 6e |ove arg |skip-syn|
|00003660| 74 61 78 2d 62 61 63 6b | 77 61 72 64 20 22 20 22 |tax-back|ward " "|
|00003670| 5d 20 35 20 28 23 24 20 | 2e 20 31 33 36 36 31 29 |] 5 (#$ |. 13661)|
|00003680| 20 22 70 22 5d 29 0a 23 | 40 39 35 20 4d 6f 76 65 | "p"]).#|@95 Move|
|00003690| 20 62 61 63 6b 77 61 72 | 64 20 61 63 72 6f 73 73 | backwar|d across|
|000036a0| 20 41 52 47 20 73 68 65 | 6c 6c 20 63 6f 6d 6d 61 | ARG she|ll comma|
|000036b0| 6e 64 28 73 29 2e 20 20 | 44 6f 65 73 20 6e 6f 74 |nd(s). |Does not|
|000036c0| 20 63 72 6f 73 73 20 6c | 69 6e 65 73 2e 0a 53 65 | cross l|ines..Se|
|000036d0| 65 20 60 73 68 65 6c 6c | 2d 63 6f 6d 6d 61 6e 64 |e `shell|-command|
|000036e0| 2d 72 65 67 65 78 70 27 | 2e 1f 0a 28 64 65 66 61 |-regexp'|...(defa|
|000036f0| 6c 69 61 73 20 27 74 73 | 68 65 6c 6c 2d 62 61 63 |lias 'ts|hell-bac|
|00003700| 6b 77 61 72 64 2d 63 6f | 6d 6d 61 6e 64 20 23 5b |kward-co|mmand #[|
|00003710| 28 26 6f 70 74 69 6f 6e | 61 6c 20 61 72 67 29 20 |(&option|al arg) |
|00003720| 22 8a c0 c1 21 88 60 29 | 89 1a 60 56 ab 87 8a c3 |"...!.`)|..`V....|
|00003730| 79 88 60 12 29 c4 c5 5c | 6e 5c 22 88 c6 c7 c8 0e |y.`.)..\|n\".....|
|00003740| 09 5c 22 5c 6e ca 0e 0b | 24 ad 87 cc 94 62 88 cd |.\"\n...|$....b..|
|00003750| c1 77 29 87 22 20 5b 74 | 65 72 6d 2d 62 6f 6c 20 |.w)." [t|erm-bol |
|00003760| 6e 69 6c 20 6c 69 6d 69 | 74 20 30 20 73 6b 69 70 |nil limi|t 0 skip|
|00003770| 2d 73 79 6e 74 61 78 2d | 62 61 63 6b 77 61 72 64 |-syntax-|backward|
|00003780| 20 22 20 22 20 72 65 2d | 73 65 61 72 63 68 2d 62 | " " re-|search-b|
|00003790| 61 63 6b 77 61 72 64 20 | 66 6f 72 6d 61 74 20 22 |ackward |format "|
|000037a0| 5b 3b 26 7c 5d 2b 5b 09 | 20 5d 2a 5c 5c 28 25 73 |[;&|]+[.| ]*\\(%s|
|000037b0| 5c 5c 29 22 20 73 68 65 | 6c 6c 2d 63 6f 6d 6d 61 |\\)" she|ll-comma|
|000037c0| 6e 64 2d 72 65 67 65 78 | 70 20 6d 6f 76 65 20 61 |nd-regex|p move a|
|000037d0| 72 67 20 31 20 22 3b 26 | 7c 22 5d 20 36 20 28 23 |rg 1 ";&||"] 6 (#|
|000037e0| 24 20 2e 20 31 33 39 36 | 34 29 20 22 70 22 5d 29 |$ . 1396|4) "p"])|
|000037f0| 0a 23 40 34 35 37 20 44 | 79 6e 61 6d 69 63 61 6c |.#@457 D|ynamical|
|00003800| 6c 79 20 63 6f 6d 70 6c | 65 74 65 20 74 68 65 20 |ly compl|ete the |
|00003810| 63 6f 6d 6d 61 6e 64 20 | 61 74 20 70 6f 69 6e 74 |command |at point|
|00003820| 2e 0a 54 68 69 73 20 66 | 75 6e 63 74 69 6f 6e 20 |..This f|unction |
|00003830| 69 73 20 73 69 6d 69 6c | 61 72 20 74 6f 20 60 74 |is simil|ar to `t|
|00003840| 65 72 6d 2d 64 79 6e 61 | 6d 69 63 2d 63 6f 6d 70 |erm-dyna|mic-comp|
|00003850| 6c 65 74 65 2d 66 69 6c | 65 6e 61 6d 65 27 2c 20 |lete-fil|ename', |
|00003860| 65 78 63 65 70 74 20 74 | 68 61 74 20 69 74 0a 73 |except t|hat it.s|
|00003870| 65 61 72 63 68 65 73 20 | 60 65 78 65 63 2d 70 61 |earches |`exec-pa|
|00003880| 74 68 27 20 28 6d 69 6e | 75 73 20 74 68 65 20 74 |th' (min|us the t|
|00003890| 72 61 69 6c 69 6e 67 20 | 65 6d 61 63 73 20 6c 69 |railing |emacs li|
|000038a0| 62 72 61 72 79 20 70 61 | 74 68 29 20 66 6f 72 20 |brary pa|th) for |
|000038b0| 63 6f 6d 70 6c 65 74 69 | 6f 6e 0a 63 61 6e 64 69 |completi|on.candi|
|000038c0| 64 61 74 65 73 2e 20 20 | 4e 6f 74 65 20 74 68 61 |dates. |Note tha|
|000038d0| 74 20 74 68 69 73 20 6d | 61 79 20 6e 6f 74 20 62 |t this m|ay not b|
|000038e0| 65 20 74 68 65 20 73 61 | 6d 65 20 61 73 20 74 68 |e the sa|me as th|
|000038f0| 65 20 73 68 65 6c 6c 27 | 73 20 69 64 65 61 20 6f |e shell'|s idea o|
|00003900| 66 20 74 68 65 0a 70 61 | 74 68 2e 0a 0a 43 6f 6d |f the.pa|th...Com|
|00003910| 70 6c 65 74 69 6f 6e 20 | 69 73 20 64 65 70 65 6e |pletion |is depen|
|00003920| 64 65 6e 74 20 6f 6e 20 | 74 68 65 20 76 61 6c 75 |dent on |the valu|
|00003930| 65 20 6f 66 20 60 73 68 | 65 6c 6c 2d 63 6f 6d 70 |e of `sh|ell-comp|
|00003940| 6c 65 74 69 6f 6e 2d 65 | 78 65 63 6f 6e 6c 79 27 |letion-e|xeconly'|
|00003950| 2c 20 70 6c 75 73 0a 74 | 68 6f 73 65 20 74 68 61 |, plus.t|hose tha|
|00003960| 74 20 65 66 66 65 63 74 | 20 66 69 6c 65 20 63 6f |t effect| file co|
|00003970| 6d 70 6c 65 74 69 6f 6e | 2e 20 20 53 65 65 20 60 |mpletion|. See `|
|00003980| 74 73 68 65 6c 6c 2d 64 | 79 6e 61 6d 69 63 2d 63 |tshell-d|ynamic-c|
|00003990| 6f 6d 70 6c 65 74 65 2d | 61 73 2d 63 6f 6d 6d 61 |omplete-|as-comma|
|000039a0| 6e 64 27 2e 0a 0a 52 65 | 74 75 72 6e 73 20 74 20 |nd'...Re|turns t |
|000039b0| 69 66 20 73 75 63 63 65 | 73 73 66 75 6c 2e 1f 0a |if succe|ssful...|
|000039c0| 28 64 65 66 61 6c 69 61 | 73 20 27 74 73 68 65 6c |(defalia|s 'tshel|
|000039d0| 6c 2d 64 79 6e 61 6d 69 | 63 2d 63 6f 6d 70 6c 65 |l-dynami|c-comple|
|000039e0| 74 65 2d 63 6f 6d 6d 61 | 6e 64 20 23 5b 6e 69 6c |te-comma|nd #[nil|
|000039f0| 20 22 c0 20 89 19 ad 9f | c2 20 1b c4 8e c5 c6 09 | ". ....|. ......|
|00003a00| 5c 22 2a 3f ad 92 c7 94 | 8a c8 c9 21 88 60 29 61 |\"*?....|...!.`)a|
|00003a10| ad 86 ca cb 21 88 cc 20 | 29 87 22 20 5b 74 65 72 |....!.. |)." [ter|
|00003a20| 6d 2d 6d 61 74 63 68 2d | 70 61 72 74 69 61 6c 2d |m-match-|partial-|
|00003a30| 66 69 6c 65 6e 61 6d 65 | 20 66 69 6c 65 6e 61 6d |filename| filenam|
|00003a40| 65 20 6d 61 74 63 68 2d | 64 61 74 61 20 6d 61 74 |e match-|data mat|
|00003a50| 63 68 2d 64 61 74 61 20 | 28 28 73 74 6f 72 65 2d |ch-data |((store-|
|00003a60| 6d 61 74 63 68 2d 64 61 | 74 61 20 6d 61 74 63 68 |match-da|ta match|
|00003a70| 2d 64 61 74 61 29 29 20 | 73 74 72 69 6e 67 2d 6d |-data)) |string-m|
|00003a80| 61 74 63 68 20 22 5b 7e | 2f 5d 22 20 30 20 74 73 |atch "[~|/]" 0 ts|
|00003a90| 68 65 6c 6c 2d 62 61 63 | 6b 77 61 72 64 2d 63 6f |hell-bac|kward-co|
|00003aa0| 6d 6d 61 6e 64 20 31 20 | 6d 65 73 73 61 67 65 20 |mmand 1 |message |
|00003ab0| 22 43 6f 6d 70 6c 65 74 | 69 6e 67 20 63 6f 6d 6d |"Complet|ing comm|
|00003ac0| 61 6e 64 20 6e 61 6d 65 | 2e 2e 2e 22 20 74 73 68 |and name|..." tsh|
|00003ad0| 65 6c 6c 2d 64 79 6e 61 | 6d 69 63 2d 63 6f 6d 70 |ell-dyna|mic-comp|
|00003ae0| 6c 65 74 65 2d 61 73 2d | 63 6f 6d 6d 61 6e 64 5d |lete-as-|command]|
|00003af0| 20 34 20 28 23 24 20 2e | 20 31 34 33 32 37 29 20 | 4 (#$ .| 14327) |
|00003b00| 6e 69 6c 5d 29 0a 23 40 | 31 31 31 20 44 79 6e 61 |nil]).#@|111 Dyna|
|00003b10| 6d 69 63 61 6c 6c 79 20 | 63 6f 6d 70 6c 65 74 65 |mically |complete|
|00003b20| 20 61 74 20 70 6f 69 6e | 74 20 61 73 20 61 20 63 | at poin|t as a c|
|00003b30| 6f 6d 6d 61 6e 64 2e 0a | 53 65 65 20 60 74 73 68 |ommand..|See `tsh|
|00003b40| 65 6c 6c 2d 64 79 6e 61 | 6d 69 63 2d 63 6f 6d 70 |ell-dyna|mic-comp|
|00003b50| 6c 65 74 65 2d 66 69 6c | 65 6e 61 6d 65 27 2e 20 |lete-fil|ename'. |
|00003b60| 20 52 65 74 75 72 6e 73 | 20 74 20 69 66 20 73 75 | Returns| t if su|
|00003b70| 63 63 65 73 73 66 75 6c | 2e 1f 0a 28 64 65 66 61 |ccessful|...(defa|
|00003b80| 6c 69 61 73 20 27 74 73 | 68 65 6c 6c 2d 64 79 6e |lias 'ts|hell-dyn|
|00003b90| 61 6d 69 63 2d 63 6f 6d | 70 6c 65 74 65 2d 61 73 |amic-com|plete-as|
|00003ba0| 2d 63 6f 6d 6d 61 6e 64 | 20 23 5b 6e 69 6c 20 22 |-command| #[nil "|
|00003bb0| c0 20 ae 81 c1 1a c3 5c | 6e 21 1c c5 0e 06 21 41 |. .....\|n!....!A|
|00003bc0| 1e 07 c8 c9 0e 5c 6e 21 | 21 1e 0b 0e 0c ad 86 cd |.....\n!|!.......|
|00003bd0| ce 0e 0c cf 23 1e 10 c1 | 1e 11 d2 1e 13 c1 1e 14 |....#...|........|
|00003be0| c1 1e 15 d2 1e 16 0e 07 | ab e9 c8 d7 0e 07 40 ae |........|......@.|
|00003bf0| 81 d8 21 21 16 11 d9 0e | 11 21 ad 85 da 0c 0e 11 |..!!....|.!......|
|00003c00| 5c 22 89 16 13 ab c5 0e | 13 40 16 14 0e 11 0e 14 |\"......|.@......|
|00003c10| 50 16 15 0e 14 0e 16 b6 | ac aa 0e 10 ab 88 db 0e |P.......|........|
|00003c20| 10 0e 14 5c 22 ac 9e 0e | 11 0e 0b 98 ac 86 dc 0e |...\"...|........|
|00003c30| 15 21 ac 91 0e 1d ab 86 | de 0e 15 21 ab 87 0e 14 |.!......|...!....|
|00003c40| 0e 16 42 16 16 0e 13 41 | 89 16 13 ac 3b 0e 07 41 |..B....A|....;..A|
|00003c50| 89 16 07 ac 17 d2 1e 1f | e0 0c 0e 16 5c 22 29 89 |........|....\").|
|00003c60| 1e 21 e2 73 ab 8d 0e 1f | ab 89 dc c0 20 21 ac 83 |.!.s....|.... !..|
|00003c70| e3 63 88 0e 21 2e 0b 87 | 22 20 5b 74 65 72 6d 2d |.c..!...|" [term-|
|00003c80| 6d 61 74 63 68 2d 70 61 | 72 74 69 61 6c 2d 66 69 |match-pa|rtial-fi|
|00003c90| 6c 65 6e 61 6d 65 20 22 | 22 20 66 69 6c 65 6e 61 |lename "|" filena|
|00003ca0| 6d 65 20 66 69 6c 65 2d | 6e 61 6d 65 2d 6e 6f 6e |me file-|name-non|
|00003cb0| 64 69 72 65 63 74 6f 72 | 79 20 70 61 74 68 6e 6f |director|y pathno|
|00003cc0| 6e 64 69 72 20 72 65 76 | 65 72 73 65 20 65 78 65 |ndir rev|erse exe|
|00003cd0| 63 2d 70 61 74 68 20 70 | 61 74 68 73 20 66 69 6c |c-path p|aths fil|
|00003ce0| 65 2d 6e 61 6d 65 2d 61 | 73 2d 64 69 72 65 63 74 |e-name-a|s-direct|
|00003cf0| 6f 72 79 20 65 78 70 61 | 6e 64 2d 66 69 6c 65 2d |ory expa|nd-file-|
|00003d00| 6e 61 6d 65 20 64 65 66 | 61 75 6c 74 2d 64 69 72 |name def|ault-dir|
|00003d10| 65 63 74 6f 72 79 20 63 | 77 64 20 74 65 72 6d 2d |ectory c|wd term-|
|00003d20| 63 6f 6d 70 6c 65 74 69 | 6f 6e 2d 66 69 67 6e 6f |completi|on-figno|
|00003d30| 72 65 20 6d 61 70 63 6f | 6e 63 61 74 20 23 5b 28 |re mapco|ncat #[(|
|00003d40| 78 29 20 22 c0 09 21 c2 | 50 87 22 20 5b 72 65 67 |x) "..!.|P." [reg|
|00003d50| 65 78 70 2d 71 75 6f 74 | 65 20 78 20 22 24 22 5d |exp-quot|e x "$"]|
|00003d60| 20 32 5d 20 22 5c 5c 7c | 22 20 69 67 6e 6f 72 65 | 2] "\\||" ignore|
|00003d70| 64 2d 65 78 74 65 6e 73 | 69 6f 6e 73 20 70 61 74 |d-extens|ions pat|
|00003d80| 68 20 6e 69 6c 20 63 6f | 6d 70 73 2d 69 6e 2d 70 |h nil co|mps-in-p|
|00003d90| 61 74 68 20 66 69 6c 65 | 20 66 69 6c 65 70 61 74 |ath file| filepat|
|00003da0| 68 20 63 6f 6d 70 6c 65 | 74 69 6f 6e 73 20 74 65 |h comple|tions te|
|00003db0| 72 6d 2d 64 69 72 65 63 | 74 6f 72 79 20 22 2e 22 |rm-direc|tory "."|
|00003dc0| 20 66 69 6c 65 2d 61 63 | 63 65 73 73 69 62 6c 65 | file-ac|cessible|
|00003dd0| 2d 64 69 72 65 63 74 6f | 72 79 2d 70 20 66 69 6c |-directo|ry-p fil|
|00003de0| 65 2d 6e 61 6d 65 2d 61 | 6c 6c 2d 63 6f 6d 70 6c |e-name-a|ll-compl|
|00003df0| 65 74 69 6f 6e 73 20 73 | 74 72 69 6e 67 2d 6d 61 |etions s|tring-ma|
|00003e00| 74 63 68 20 66 69 6c 65 | 2d 64 69 72 65 63 74 6f |tch file|-directo|
|00003e10| 72 79 2d 70 20 73 68 65 | 6c 6c 2d 63 6f 6d 70 6c |ry-p she|ll-compl|
|00003e20| 65 74 69 6f 6e 2d 65 78 | 65 63 6f 6e 6c 79 20 66 |etion-ex|econly f|
|00003e30| 69 6c 65 2d 65 78 65 63 | 75 74 61 62 6c 65 2d 70 |ile-exec|utable-p|
|00003e40| 20 74 65 72 6d 2d 63 6f | 6d 70 6c 65 74 69 6f 6e | term-co|mpletion|
|00003e50| 2d 61 64 64 73 75 66 66 | 69 78 20 74 65 72 6d 2d |-addsuff|ix term-|
|00003e60| 64 79 6e 61 6d 69 63 2d | 73 69 6d 70 6c 65 2d 63 |dynamic-|simple-c|
|00003e70| 6f 6d 70 6c 65 74 65 20 | 73 75 63 63 65 73 73 20 |omplete |success |
|00003e80| 28 73 6f 6c 65 20 73 68 | 6f 72 74 65 73 74 29 20 |(sole sh|ortest) |
|00003e90| 22 20 22 5d 20 35 20 28 | 23 24 20 2e 20 31 35 31 |" "] 5 (|#$ . 151|
|00003ea0| 31 36 29 5d 29 0a 23 40 | 35 35 20 52 65 74 75 72 |16)]).#@|55 Retur|
|00003eb0| 6e 20 74 68 65 20 76 61 | 72 69 61 62 6c 65 20 61 |n the va|riable a|
|00003ec0| 74 20 70 6f 69 6e 74 2c | 20 6f 72 20 6e 69 6c 20 |t point,| or nil |
|00003ed0| 69 66 20 6e 6f 6e 20 69 | 73 20 66 6f 75 6e 64 2e |if non i|s found.|
|00003ee0| 1f 0a 28 64 65 66 61 6c | 69 61 73 20 27 74 73 68 |..(defal|ias 'tsh|
|00003ef0| 65 6c 6c 2d 6d 61 74 63 | 68 2d 70 61 72 74 69 61 |ell-matc|h-partia|
|00003f00| 6c 2d 76 61 72 69 61 62 | 6c 65 20 23 5b 6e 69 6c |l-variab|le #[nil|
|00003f10| 20 22 8a 60 18 c1 c2 c3 | c4 23 ab 88 c5 c6 21 ac | ".`....|.#....!.|
|00003f20| 83 c7 75 88 6c ae 83 c5 | c8 21 3f ad 8a c9 ca 08 |..u.l...|.!?.....|
|00003f30| 5c 22 88 cb 94 cb 95 7b | 2a 87 22 20 5b 6c 69 6d |\".....{|*." [lim|
|00003f40| 69 74 20 72 65 2d 73 65 | 61 72 63 68 2d 62 61 63 |it re-se|arch-bac|
|00003f50| 6b 77 61 72 64 20 22 5b | 5e 41 2d 5a 61 2d 7a 30 |kward "[|^A-Za-z0|
|00003f60| 2d 39 5f 7b 7d 5d 22 20 | 6e 69 6c 20 6d 6f 76 65 |-9_{}]" |nil move|
|00003f70| 20 6c 6f 6f 6b 69 6e 67 | 2d 61 74 20 22 5c 5c 24 | looking|-at "\\$|
|00003f80| 22 20 31 20 22 5b 5e 41 | 2d 5a 61 2d 7a 30 2d 39 |" 1 "[^A|-Za-z0-9|
|00003f90| 5f 7b 7d 24 5d 22 20 72 | 65 2d 73 65 61 72 63 68 |_{}$]" r|e-search|
|00003fa0| 2d 66 6f 72 77 61 72 64 | 20 22 5c 5c 24 3f 7b 3f |-forward| "\\$?{?|
|00003fb0| 5b 41 2d 5a 61 2d 7a 30 | 2d 39 5f 5d 2a 7d 3f 22 |[A-Za-z0|-9_]*}?"|
|00003fc0| 20 30 5d 20 34 20 28 23 | 24 20 2e 20 31 36 30 34 | 0] 4 (#|$ . 1604|
|00003fd0| 33 29 5d 29 0a 23 40 37 | 33 38 20 44 79 6e 61 6d |3)]).#@7|38 Dynam|
|00003fe0| 69 63 61 6c 6c 79 20 63 | 6f 6d 70 6c 65 74 65 20 |ically c|omplete |
|00003ff0| 74 68 65 20 65 6e 76 69 | 72 6f 6e 6d 65 6e 74 20 |the envi|ronment |
|00004000| 76 61 72 69 61 62 6c 65 | 20 61 74 20 70 6f 69 6e |variable| at poin|
|00004010| 74 2e 0a 43 6f 6d 70 6c | 65 74 65 73 20 69 66 20 |t..Compl|etes if |
|00004020| 61 66 74 65 72 20 61 20 | 76 61 72 69 61 62 6c 65 |after a |variable|
|00004030| 2c 20 69 2e 65 2e 2c 20 | 69 66 20 69 74 20 73 74 |, i.e., |if it st|
|00004040| 61 72 74 73 20 77 69 74 | 68 20 61 20 22 24 22 2e |arts wit|h a "$".|
|00004050| 0a 53 65 65 20 60 74 73 | 68 65 6c 6c 2d 64 79 6e |.See `ts|hell-dyn|
|00004060| 61 6d 69 63 2d 63 6f 6d | 70 6c 65 74 65 2d 61 73 |amic-com|plete-as|
|00004070| 2d 65 6e 76 69 72 6f 6e | 6d 65 6e 74 2d 76 61 72 |-environ|ment-var|
|00004080| 69 61 62 6c 65 27 2e 0a | 0a 54 68 69 73 20 66 75 |iable'..|.This fu|
|00004090| 6e 63 74 69 6f 6e 20 69 | 73 20 73 69 6d 69 6c 61 |nction i|s simila|
|000040a0| 72 20 74 6f 20 60 74 65 | 72 6d 2d 64 79 6e 61 6d |r to `te|rm-dynam|
|000040b0| 69 63 2d 63 6f 6d 70 6c | 65 74 65 2d 66 69 6c 65 |ic-compl|ete-file|
|000040c0| 6e 61 6d 65 27 2c 20 65 | 78 63 65 70 74 20 74 68 |name', e|xcept th|
|000040d0| 61 74 20 69 74 0a 73 65 | 61 72 63 68 65 73 20 60 |at it.se|arches `|
|000040e0| 70 72 6f 63 65 73 73 2d | 65 6e 76 69 72 6f 6e 6d |process-|environm|
|000040f0| 65 6e 74 27 20 66 6f 72 | 20 63 6f 6d 70 6c 65 74 |ent' for| complet|
|00004100| 69 6f 6e 20 63 61 6e 64 | 69 64 61 74 65 73 2e 20 |ion cand|idates. |
|00004110| 20 4e 6f 74 65 20 74 68 | 61 74 20 74 68 69 73 20 | Note th|at this |
|00004120| 6d 61 79 0a 6e 6f 74 20 | 62 65 20 74 68 65 20 73 |may.not |be the s|
|00004130| 61 6d 65 20 61 73 20 74 | 68 65 20 69 6e 74 65 72 |ame as t|he inter|
|00004140| 70 72 65 74 65 72 27 73 | 20 69 64 65 61 20 6f 66 |preter's| idea of|
|00004150| 20 76 61 72 69 61 62 6c | 65 20 6e 61 6d 65 73 2e | variabl|e names.|
|00004160| 20 20 54 68 65 20 6d 61 | 69 6e 20 70 72 6f 62 6c | The ma|in probl|
|00004170| 65 6d 0a 77 69 74 68 20 | 74 68 69 73 20 74 79 70 |em.with |this typ|
|00004180| 65 20 6f 66 20 63 6f 6d | 70 6c 65 74 69 6f 6e 20 |e of com|pletion |
|00004190| 69 73 20 74 68 61 74 20 | 60 70 72 6f 63 65 73 73 |is that |`process|
|000041a0| 2d 65 6e 76 69 72 6f 6e | 6d 65 6e 74 27 20 69 73 |-environ|ment' is|
|000041b0| 20 74 68 65 20 65 6e 76 | 69 72 6f 6e 6d 65 6e 74 | the env|ironment|
|000041c0| 0a 77 68 69 63 68 20 45 | 6d 61 63 73 20 73 74 61 |.which E|macs sta|
|000041d0| 72 74 65 64 20 77 69 74 | 68 2e 20 20 45 6d 61 63 |rted wit|h. Emac|
|000041e0| 73 20 64 6f 65 73 20 6e | 6f 74 20 74 72 61 63 6b |s does n|ot track|
|000041f0| 20 63 68 61 6e 67 65 73 | 20 74 6f 20 74 68 65 20 | changes| to the |
|00004200| 65 6e 76 69 72 6f 6e 6d | 65 6e 74 20 6d 61 64 65 |environm|ent made|
|00004210| 0a 62 79 20 74 68 65 20 | 69 6e 74 65 72 70 72 65 |.by the |interpre|
|00004220| 74 65 72 2e 20 20 50 65 | 72 68 61 70 73 20 69 74 |ter. Pe|rhaps it|
|00004230| 20 77 6f 75 6c 64 20 62 | 65 20 6d 6f 72 65 20 61 | would b|e more a|
|00004240| 63 63 75 72 61 74 65 20 | 69 66 20 74 68 69 73 20 |ccurate |if this |
|00004250| 66 75 6e 63 74 69 6f 6e | 20 77 61 73 0a 63 61 6c |function| was.cal|
|00004260| 6c 65 64 20 60 74 73 68 | 65 6c 6c 2d 64 79 6e 61 |led `tsh|ell-dyna|
|00004270| 6d 69 63 2d 63 6f 6d 70 | 6c 65 74 65 2d 70 72 6f |mic-comp|lete-pro|
|00004280| 63 65 73 73 2d 65 6e 76 | 69 72 6f 6e 6d 65 6e 74 |cess-env|ironment|
|00004290| 2d 76 61 72 69 61 62 6c | 65 27 2e 0a 0a 52 65 74 |-variabl|e'...Ret|
|000042a0| 75 72 6e 73 20 6e 6f 6e | 2d 6e 69 6c 20 69 66 20 |urns non|-nil if |
|000042b0| 73 75 63 63 65 73 73 66 | 75 6c 2e 1f 0a 28 64 65 |successf|ul...(de|
|000042c0| 66 61 6c 69 61 73 20 27 | 74 73 68 65 6c 6c 2d 64 |falias '|tshell-d|
|000042d0| 79 6e 61 6d 69 63 2d 63 | 6f 6d 70 6c 65 74 65 2d |ynamic-c|omplete-|
|000042e0| 65 6e 76 69 72 6f 6e 6d | 65 6e 74 2d 76 61 72 69 |environm|ent-vari|
|000042f0| 61 62 6c 65 20 23 5b 6e | 69 6c 20 22 c0 20 89 19 |able #[n|il ". ..|
|00004300| ad 8c c2 c3 09 5c 22 ad | 86 c4 c5 21 88 c6 20 29 |.....\".|...!.. )|
|00004310| 87 22 20 5b 74 73 68 65 | 6c 6c 2d 6d 61 74 63 68 |." [tshe|ll-match|
|00004320| 2d 70 61 72 74 69 61 6c | 2d 76 61 72 69 61 62 6c |-partial|-variabl|
|00004330| 65 20 76 61 72 69 61 62 | 6c 65 20 73 74 72 69 6e |e variab|le strin|
|00004340| 67 2d 6d 61 74 63 68 20 | 22 5e 5c 5c 24 22 20 6d |g-match |"^\\$" m|
|00004350| 65 73 73 61 67 65 20 22 | 43 6f 6d 70 6c 65 74 69 |essage "|Completi|
|00004360| 6e 67 20 76 61 72 69 61 | 62 6c 65 20 6e 61 6d 65 |ng varia|ble name|
|00004370| 2e 2e 2e 22 20 74 73 68 | 65 6c 6c 2d 64 79 6e 61 |..." tsh|ell-dyna|
|00004380| 6d 69 63 2d 63 6f 6d 70 | 6c 65 74 65 2d 61 73 2d |mic-comp|lete-as-|
|00004390| 65 6e 76 69 72 6f 6e 6d | 65 6e 74 2d 76 61 72 69 |environm|ent-vari|
|000043a0| 61 62 6c 65 5d 20 34 20 | 28 23 24 20 2e 20 31 36 |able] 4 |(#$ . 16|
|000043b0| 33 34 37 29 20 6e 69 6c | 5d 29 0a 23 40 31 35 32 |347) nil|]).#@152|
|000043c0| 20 44 79 6e 61 6d 69 63 | 61 6c 6c 79 20 63 6f 6d | Dynamic|ally com|
|000043d0| 70 6c 65 74 65 20 61 74 | 20 70 6f 69 6e 74 20 61 |plete at| point a|
|000043e0| 73 20 61 6e 20 65 6e 76 | 69 72 6f 6e 6d 65 6e 74 |s an env|ironment|
|000043f0| 20 76 61 72 69 61 62 6c | 65 2e 0a 55 73 65 64 20 | variabl|e..Used |
|00004400| 62 79 20 60 74 73 68 65 | 6c 6c 2d 64 79 6e 61 6d |by `tshe|ll-dynam|
|00004410| 69 63 2d 63 6f 6d 70 6c | 65 74 65 2d 65 6e 76 69 |ic-compl|ete-envi|
|00004420| 72 6f 6e 6d 65 6e 74 2d | 76 61 72 69 61 62 6c 65 |ronment-|variable|
|00004430| 27 2e 0a 55 73 65 73 20 | 60 74 65 72 6d 2d 64 79 |'..Uses |`term-dy|
|00004440| 6e 61 6d 69 63 2d 73 69 | 6d 70 6c 65 2d 63 6f 6d |namic-si|mple-com|
|00004450| 70 6c 65 74 65 27 2e 1f | 0a 28 64 65 66 61 6c 69 |plete'..|.(defali|
|00004460| 61 73 20 27 74 73 68 65 | 6c 6c 2d 64 79 6e 61 6d |as 'tshe|ll-dynam|
|00004470| 69 63 2d 63 6f 6d 70 6c | 65 74 65 2d 61 73 2d 65 |ic-compl|ete-as-e|
|00004480| 6e 76 69 72 6f 6e 6d 65 | 6e 74 2d 76 61 72 69 61 |nvironme|nt-varia|
|00004490| 62 6c 65 20 23 5b 6e 69 | 6c 20 22 c0 20 ae 81 c1 |ble #[ni|l ". ...|
|000044a0| 89 1a c3 c4 5c 6e 5c 22 | ae 81 c5 c6 4f 1e 07 c8 |....\n\"|....O...|
|000044b0| c9 0e 5c 6e 5c 22 1e 0b | 0e 0c 1e 0d c6 1e 0c ce |..\n\"..|........|
|000044c0| 0e 07 0e 0b 5c 22 89 1e | 0f d0 73 ab c0 c0 20 89 |....\"..|..s... .|
|000044d0| 1a c3 d1 5c 6e 5c 22 c6 | 4f 1e 07 c3 d2 5c 6e 5c |...\n\".|O....\n\|
|000044e0| 22 ab 83 d3 aa 8a c3 d4 | 5c 6e 5c 22 ab 83 d5 aa |".......|\n\"....|
|000044f0| 81 c1 1e 16 0e 0d ac 83 | c1 aa 8e d7 d8 d9 0e 07 |........|........|
|00004500| 21 21 21 ab 83 da aa 81 | db 1e 1c 0e 16 0e 1c b1 |!!!.....|........|
|00004510| 02 88 2c 0e 0f 2e 06 87 | 22 20 5b 74 73 68 65 6c |..,.....|" [tshel|
|00004520| 6c 2d 6d 61 74 63 68 2d | 70 61 72 74 69 61 6c 2d |l-match-|partial-|
|00004530| 76 61 72 69 61 62 6c 65 | 20 22 22 20 76 61 72 20 |variable| "" var |
|00004540| 73 74 72 69 6e 67 2d 6d | 61 74 63 68 20 22 5b 5e |string-m|atch "[^|
|00004550| 24 28 7b 5d 5c 5c 7c 24 | 22 20 30 20 6e 69 6c 20 |$({]\\|$|" 0 nil |
|00004560| 76 61 72 69 61 62 6c 65 | 20 6d 61 70 63 61 72 20 |variable| mapcar |
|00004570| 23 5b 28 78 29 20 22 08 | c1 c2 c3 08 5c 22 4f 87 |#[(x) ".|....\"O.|
|00004580| 22 20 5b 78 20 30 20 73 | 74 72 69 6e 67 2d 6d 61 |" [x 0 s|tring-ma|
|00004590| 74 63 68 20 22 3d 22 5d | 20 35 5d 20 70 72 6f 63 |tch "="]| 5] proc|
|000045a0| 65 73 73 2d 65 6e 76 69 | 72 6f 6e 6d 65 6e 74 20 |ess-envi|ronment |
|000045b0| 76 61 72 69 61 62 6c 65 | 73 20 74 65 72 6d 2d 63 |variable|s term-c|
|000045c0| 6f 6d 70 6c 65 74 69 6f | 6e 2d 61 64 64 73 75 66 |ompletio|n-addsuf|
|000045d0| 66 69 78 20 61 64 64 73 | 75 66 66 69 78 20 74 65 |fix adds|uffix te|
|000045e0| 72 6d 2d 64 79 6e 61 6d | 69 63 2d 73 69 6d 70 6c |rm-dynam|ic-simpl|
|000045f0| 65 2d 63 6f 6d 70 6c 65 | 74 65 20 73 75 63 63 65 |e-comple|te succe|
|00004600| 73 73 20 28 73 6f 6c 65 | 20 73 68 6f 72 74 65 73 |ss (sole| shortes|
|00004610| 74 29 20 22 5b 5e 24 28 | 7b 5d 22 20 22 7b 22 20 |t) "[^$(|{]" "{" |
|00004620| 22 7d 22 20 22 28 22 20 | 22 29 22 20 70 72 6f 74 |"}" "(" |")" prot|
|00004630| 65 63 74 69 6f 6e 20 66 | 69 6c 65 2d 64 69 72 65 |ection f|ile-dire|
|00004640| 63 74 6f 72 79 2d 70 20 | 74 65 72 6d 2d 64 69 72 |ctory-p |term-dir|
|00004650| 65 63 74 6f 72 79 20 67 | 65 74 65 6e 76 20 22 2f |ectory g|etenv "/|
|00004660| 22 20 22 20 22 20 73 75 | 66 66 69 78 5d 20 35 20 |" " " su|ffix] 5 |
|00004670| 28 23 24 20 2e 20 31 37 | 33 34 35 29 5d 29 0a 23 |(#$ . 17|345)]).#|
|00004680| 40 31 38 32 20 45 78 70 | 61 6e 64 20 64 69 72 65 |@182 Exp|and dire|
|00004690| 63 74 6f 72 79 20 73 74 | 61 63 6b 20 72 65 66 65 |ctory st|ack refe|
|000046a0| 72 65 6e 63 65 20 62 65 | 66 6f 72 65 20 70 6f 69 |rence be|fore poi|
|000046b0| 6e 74 2e 0a 44 69 72 65 | 63 74 6f 72 79 20 73 74 |nt..Dire|ctory st|
|000046c0| 61 63 6b 20 72 65 66 65 | 72 65 6e 63 65 73 20 61 |ack refe|rences a|
|000046d0| 72 65 20 6f 66 20 74 68 | 65 20 66 6f 72 6d 20 22 |re of th|e form "|
|000046e0| 3d 64 69 67 69 74 22 20 | 6f 72 20 22 3d 2d 22 2e |=digit" |or "=-".|
|000046f0| 0a 53 65 65 20 60 64 65 | 66 61 75 6c 74 2d 64 69 |.See `de|fault-di|
|00004700| 72 65 63 74 6f 72 79 27 | 20 61 6e 64 20 60 74 73 |rectory'| and `ts|
|00004710| 68 65 6c 6c 2d 64 69 72 | 73 74 61 63 6b 27 2e 0a |hell-dir|stack'..|
|00004720| 0a 52 65 74 75 72 6e 73 | 20 74 20 69 66 20 73 75 |.Returns| t if su|
|00004730| 63 63 65 73 73 66 75 6c | 2e 1f 0a 28 64 65 66 61 |ccessful|...(defa|
|00004740| 6c 69 61 73 20 27 74 73 | 68 65 6c 6c 2d 72 65 70 |lias 'ts|hell-rep|
|00004750| 6c 61 63 65 2d 62 79 2d | 65 78 70 61 6e 64 65 64 |lace-by-|expanded|
|00004760| 2d 64 69 72 65 63 74 6f | 72 79 20 23 5b 6e 69 6c |-directo|ry #[nil|
|00004770| 20 22 c0 20 ad c9 8a c1 | 94 62 88 5c 6e 0b 42 c4 | ". ....|.b.\n.B.|
|00004780| c5 21 ab 84 0b 47 aa 8c | c4 c6 21 ad 87 c7 c8 94 |.!...G..|..!.....|
|00004790| c8 95 7b 21 1e 09 1e 5c | 6e 0e 09 ac 83 cb aa a0 |..{!...\|n.......|
|000047a0| 0e 09 0e 5c 6e 47 59 ab | 85 cc cd 21 aa 93 ce cf |...\nGY.|...!....|
|000047b0| 0e 09 0e 5c 6e 38 21 d0 | 89 23 88 d1 d2 0e 09 5c |...\n8!.|.#.....\|
|000047c0| 22 88 d0 2b 87 22 20 5b | 74 65 72 6d 2d 6d 61 74 |"..+." [|term-mat|
|000047d0| 63 68 2d 70 61 72 74 69 | 61 6c 2d 66 69 6c 65 6e |ch-parti|al-filen|
|000047e0| 61 6d 65 20 30 20 64 65 | 66 61 75 6c 74 2d 64 69 |ame 0 de|fault-di|
|000047f0| 72 65 63 74 6f 72 79 20 | 74 73 68 65 6c 6c 2d 64 |rectory |tshell-d|
|00004800| 69 72 73 74 61 63 6b 20 | 6c 6f 6f 6b 69 6e 67 2d |irstack |looking-|
|00004810| 61 74 20 22 3d 2d 2f 3f | 22 20 22 3d 5c 5c 28 5b |at "=-/?|" "=\\([|
|00004820| 30 2d 39 5d 2b 5c 5c 29 | 22 20 73 74 72 69 6e 67 |0-9]+\\)|" string|
|00004830| 2d 74 6f 2d 6e 75 6d 62 | 65 72 20 31 20 69 6e 64 |-to-numb|er 1 ind|
|00004840| 65 78 20 73 74 61 63 6b | 20 6e 69 6c 20 65 72 72 |ex stack| nil err|
|00004850| 6f 72 20 22 44 69 72 65 | 63 74 6f 72 79 20 73 74 |or "Dire|ctory st|
|00004860| 61 63 6b 20 6e 6f 74 20 | 74 68 61 74 20 64 65 65 |ack not |that dee|
|00004870| 70 2e 22 20 72 65 70 6c | 61 63 65 2d 6d 61 74 63 |p." repl|ace-matc|
|00004880| 68 20 66 69 6c 65 2d 6e | 61 6d 65 2d 61 73 2d 64 |h file-n|ame-as-d|
|00004890| 69 72 65 63 74 6f 72 79 | 20 74 20 6d 65 73 73 61 |irectory| t messa|
|000048a0| 67 65 20 22 44 69 72 65 | 63 74 6f 72 79 20 69 74 |ge "Dire|ctory it|
|000048b0| 65 6d 3a 20 25 64 22 5d | 20 34 20 28 23 24 20 2e |em: %d"]| 4 (#$ .|
|000048c0| 20 31 38 30 35 33 29 20 | 6e 69 6c 5d 29 0a 28 70 | 18053) |nil]).(p|
|000048d0| 72 6f 76 69 64 65 20 27 | 74 73 68 65 6c 6c 29 0a |rovide '|tshell).|
+--------+-------------------------+-------------------------+--------+--------+